New Makefile system
[mesa.git] / progs / xdemos / Makefile
1 # progs/xdemos/Makefile
2
3 TOP = ../../
4 include $(TOP)/configs/current
5
6
7 INCDIR = $(TOP)/include
8
9 LIBS = -L$(LIB_DIR) $(APP_LIB_DEPS)
10
11 LIB_DEP = $(LIB_DIR)/$(GL_LIB) $(LIB_DIR)/$(GLU_LIB)
12
13 PROGS = glthreads \
14 glxdemo \
15 glxgears \
16 glxheads \
17 glxinfo \
18 glxpixmap \
19 glxpbdemo \
20 glxswapcontrol \
21 manywin \
22 offset \
23 pbinfo \
24 pbdemo \
25 wincopy \
26 xdemo \
27 xfont \
28 xrotfontdemo
29
30
31
32 ##### RULES #####
33
34 .SUFFIXES:
35 .SUFFIXES: .c
36
37 .c: $(LIB_DEP)
38 $(CC) -I$(INCDIR) $(CFLAGS) $< $(LIBS) -o $@
39
40
41 ##### TARGETS #####
42
43 default: $(PROGS)
44
45
46 clean:
47 -rm -f *.o *~
48
49 realclean:
50 -rm -f $(PROGS)
51 -rm -f *.o *~
52
53
54 # special cases
55 pbinfo: pbinfo.o pbutil.o
56 $(CC) pbinfo.o pbutil.o $(LIBS) -o $@
57
58 pbdemo: pbdemo.o pbutil.o
59 $(CC) pbdemo.o pbutil.o $(LIBS) -o $@
60
61 pbinfo.o: pbinfo.c pbutil.h
62 $(CC) -c -I. -I$(INCDIR) $(CFLAGS) pbinfo.c
63
64 pbdemo.o: pbdemo.c pbutil.h
65 $(CC) -c -I. -I$(INCDIR) $(CFLAGS) pbdemo.c
66
67 pbutil.o: pbutil.c pbutil.h
68 $(CC) -c -I. -I$(INCDIR) $(CFLAGS) pbutil.c
69
70
71 xrotfontdemo: xrotfontdemo.o xuserotfont.o
72 $(CC) xrotfontdemo.o xuserotfont.o $(LIBS) -o $@
73
74 xuserotfont.o: xuserotfont.c xuserotfont.h
75 $(CC) -c -I. -I$(INCDIR) $(CFLAGS) xuserotfont.c
76
77 xrotfontdemo.o: xrotfontdemo.c xuserotfont.h
78 $(CC) -c -I. -I$(INCDIR) $(CFLAGS) xrotfontdemo.c
79