Merge branch 'mesa_7_6_branch'
[mesa.git] / progs / fp / Makefile
1 # progs/tests/Makefile
2
3
4 # These programs aren't intended to be included with the normal distro.
5 # They're not too interesting but they're good for testing.
6
7 TOP = ../..
8 include $(TOP)/configs/current
9
10
11 LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLEW_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
12
13 SOURCES = \
14 tri-tex.c \
15 point-position.c \
16 tri-depth.c \
17 tri-depth2.c \
18 tri-depthwrite.c \
19 tri-depthwrite2.c \
20 tri-param.c \
21 fp-tri.c
22
23 NOTDONE=\
24 tri-txb.c \
25 tri-txp.c \
26 tri-depthwrite.c \
27 tri-fogoption.c
28
29
30 PROGS = $(SOURCES:%.c=%)
31
32 INCLUDES = -I. -I$(TOP)/include -I../samples
33
34 UTIL_FILES = readtex.h readtex.c
35
36
37 ##### RULES #####
38
39 .SUFFIXES:
40 .SUFFIXES: .c
41
42 .c:
43 $(APP_CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
44
45 .c.o:
46 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
47
48 .S.o:
49 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
50
51
52 ##### TARGETS #####
53
54 default: $(UTIL_FILES) $(PROGS)
55
56 clean:
57 -rm -f $(PROGS)
58 -rm -f *.o
59 -rm -f getproclist.h
60
61
62 # auto code generation
63 getprocaddress: getprocaddress.c getproclist.h
64
65 getproclist.h: $(TOP)/src/mesa/glapi/gl_API.xml getprocaddress.c getprocaddress.py
66 python getprocaddress.py > getproclist.h
67
68
69 texrect: texrect.o readtex.o
70 $(CC) $(CFLAGS) $(LDFLAGS) texrect.o readtex.o $(LIBS) -o $@
71 # $(APP_CC) texrect.o readtex.o $(LIBS) -o $@
72
73 texrect.o: texrect.c readtex.h
74 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
75
76 invert: invert.o readtex.o
77 $(CC) $(CFLAGS) $(LDFLAGS) invert.o readtex.o $(LIBS) -o $@
78 # $(APP_CC) invert.o readtex.o $(LIBS) -o $@
79
80 invert.o: invert.c readtex.h
81 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
82
83 readtex.o: readtex.c
84 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
85
86
87 readtex.h: $(TOP)/progs/util/readtex.h
88 ln -s $(TOP)/progs/util/readtex.h .
89
90 readtex.c: $(TOP)/progs/util/readtex.c
91 ln -s $(TOP)/progs/util/readtex.c .
92
93
94
95
96 # Emacs tags
97 tags:
98 etags `find . -name \*.[ch]` `find ../include`