Merge branch 'mesa_7_7_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-inv.c \
21 tri-param.c \
22 fp-tri.c
23
24 NOTDONE=\
25 tri-txb.c \
26 tri-txp.c \
27 tri-depthwrite.c \
28 tri-fogoption.c
29
30
31 PROGS = $(SOURCES:%.c=%)
32
33 INCLUDES = -I. -I$(TOP)/include -I../samples
34
35 UTIL_FILES = readtex.h readtex.c
36
37
38 ##### RULES #####
39
40 .SUFFIXES:
41 .SUFFIXES: .c
42
43 .c:
44 $(APP_CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
45
46 .c.o:
47 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
48
49 .S.o:
50 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
51
52
53 ##### TARGETS #####
54
55 default: $(UTIL_FILES) $(PROGS)
56
57 clean:
58 -rm -f $(PROGS)
59 -rm -f *.o
60 -rm -f getproclist.h
61
62
63 # auto code generation
64 getprocaddress: getprocaddress.c getproclist.h
65
66 getproclist.h: $(TOP)/src/mesa/glapi/gl_API.xml getprocaddress.c getprocaddress.py
67 python getprocaddress.py > getproclist.h
68
69
70 texrect: texrect.o readtex.o
71 $(CC) $(CFLAGS) $(LDFLAGS) texrect.o readtex.o $(LIBS) -o $@
72 # $(APP_CC) texrect.o readtex.o $(LIBS) -o $@
73
74 texrect.o: texrect.c readtex.h
75 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
76
77 invert: invert.o readtex.o
78 $(CC) $(CFLAGS) $(LDFLAGS) invert.o readtex.o $(LIBS) -o $@
79 # $(APP_CC) invert.o readtex.o $(LIBS) -o $@
80
81 invert.o: invert.c readtex.h
82 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
83
84 readtex.o: readtex.c
85 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
86
87
88 readtex.h: $(TOP)/progs/util/readtex.h
89 ln -s $(TOP)/progs/util/readtex.h .
90
91 readtex.c: $(TOP)/progs/util/readtex.c
92 ln -s $(TOP)/progs/util/readtex.c .
93
94
95
96
97 # Emacs tags
98 tags:
99 etags `find . -name \*.[ch]` `find ../include`