Makefile revision 66f7fd99fa1d8c8e3b09fadd5624db9968b67506
1# src/gallium/tests/trivial/Makefile
2
3TOP = ../../../..
4include $(TOP)/configs/current
5
6INCLUDES = \
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
14LINKS += \
15	$(GALLIUM_PIPE_LOADER_LIBS) \
16	$(GALLIUM_AUXILIARIES) \
17	$(PROG_LINKS) $(LIBUDEV_LIBS)
18
19SOURCES = \
20	tri.c \
21	quad-tex.c
22
23OBJECTS = $(SOURCES:.c=.o)
24
25PROGS = $(OBJECTS:.o=)
26
27PROG_DEFINES = -DPIPE_SEARCH_DIR=\"$(PIPE_SRC_DIR)\" \
28               $(GALLIUM_PIPE_LOADER_DEFINES)
29
30PIPE_SRC_DIR = $(TOP)/src/gallium/targets/pipe-loader
31
32##### TARGETS #####
33
34default: $(PROGS) pipes
35
36install:
37
38clean:
39	-rm -f $(PROGS)
40	-rm -f *.o
41	-rm -f result.bmp
42	@$(MAKE) -C $(PIPE_SRC_DIR) clean
43
44pipes:
45	@$(MAKE) -C $(PIPE_SRC_DIR)
46
47##### RULES #####
48
49$(OBJECTS): %.o: %.c
50	$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $(PROG_DEFINES) $< -o $@
51
52$(PROGS): %: %.o $(LINKS)
53	$(CXX) $(LDFLAGS) $< $(LINKS) $(LLVM_LIBS) -lm -lpthread -ldl -o $@
54