Tizen 2.0 Release
[profile/ivi/osmesa.git] / src / gallium / tests / trivial / Makefile
1 # src/gallium/tests/trivial/Makefile
2
3 TOP = ../../../..
4 include $(TOP)/configs/current
5
6 INCLUDES = \
7         -I. \
8         -I$(TOP)/src/gallium/include \
9         -I$(TOP)/src/gallium/auxiliary \
10         -I$(TOP)/src/gallium/drivers \
11         -I$(TOP)/src/gallium/winsys \
12         $(PROG_INCLUDES)
13
14 ifeq ($(MESA_LLVM),1)
15 LINKS = $(TOP)/src/gallium/drivers/llvmpipe/libllvmpipe.a
16 LDFLAGS += $(LLVM_LDFLAGS)
17 endif
18
19 LINKS += \
20         $(TOP)/src/gallium/drivers/rbug/librbug.a \
21         $(TOP)/src/gallium/drivers/trace/libtrace.a \
22         $(TOP)/src/gallium/drivers/galahad/libgalahad.a \
23         $(TOP)/src/gallium/winsys/sw/null/libws_null.a \
24         $(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a \
25         $(GALLIUM_AUXILIARIES) \
26         $(PROG_LINKS)
27
28 SOURCES = \
29         tri.c \
30         quad-tex.c
31
32 OBJECTS = $(SOURCES:.c=.o)
33
34 PROGS = $(OBJECTS:.o=)
35
36 PROG_DEFINES = \
37         -DGALLIUM_SOFTPIPE -DGALLIUM_RBUG -DGALLIUM_TRACE -DGALLIUM_GALAHAD
38
39 ##### TARGETS #####
40
41 default: $(PROGS)
42
43 clean:
44         -rm -f $(PROGS)
45         -rm -f *.o
46         -rm -f result.bmp
47
48 ##### RULES #####
49
50 $(OBJECTS): %.o: %.c
51         $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $(PROG_DEFINES) $< -o $@
52
53 $(PROGS): %: %.o $(LINKS)
54         $(CXX) $(LDFLAGS) $< $(LINKS) $(LLVM_LIBS) -lm -lpthread -ldl -o $@