Makefile revision 3e3d6864da093a99bad282e78945a1b1c4503ca4
1# progs/gallium/simple/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	$(TOP)/src/gallium/drivers/trace/libtrace.a \
16	$(TOP)/src/gallium/winsys/sw/null/libws_null.a \
17	$(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a \
18	$(GALLIUM_AUXILIARIES) \
19	$(PROG_LINKS)
20
21SOURCES = \
22	tri.c \
23	quad-tex.c
24
25OBJECTS = $(SOURCES:.c=.o)
26
27PROGS = $(OBJECTS:.o=)
28
29##### TARGETS #####
30
31default: $(PROGS)
32
33clean:
34	-rm -f $(PROGS)
35	-rm -f *.o
36	-rm -f result.bmp
37
38##### RULES #####
39
40$(OBJECTS): %.o: %.c
41	$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $(PROG_DEFINES) $< -o $@
42
43$(PROGS): %: %.o
44	$(CC) $(LDFLAGS) $< $(LINKS) -lm -lpthread -ldl -o $@
45