Merge branch '7.8'
[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
60
61 texrect: texrect.o readtex.o
62 $(CC) $(CFLAGS) $(LDFLAGS) texrect.o readtex.o $(LIBS) -o $@
63 # $(APP_CC) texrect.o readtex.o $(LIBS) -o $@
64
65 texrect.o: texrect.c readtex.h
66 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
67
68 invert: invert.o readtex.o
69 $(CC) $(CFLAGS) $(LDFLAGS) invert.o readtex.o $(LIBS) -o $@
70 # $(APP_CC) invert.o readtex.o $(LIBS) -o $@
71
72 invert.o: invert.c readtex.h
73 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
74
75 readtex.o: readtex.c
76 $(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
77
78
79 readtex.h: $(TOP)/progs/util/readtex.h
80 ln -s $(TOP)/progs/util/readtex.h .
81
82 readtex.c: $(TOP)/progs/util/readtex.c
83 ln -s $(TOP)/progs/util/readtex.c .
84
85
86
87
88 # Emacs tags
89 tags:
90 etags `find . -name \*.[ch]` `find ../include`