specify app lib dependencies in Makefiles (patch 1/3)
[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 LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME)
10
11 LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
12
13 PROGS = \
14 corender \
15 glthreads \
16 glxdemo \
17 glxgears \
18 glxgears_fbconfig \
19 glxcontexts \
20 glxheads \
21 glxinfo \
22 glxpixmap \
23 glxpbdemo \
24 glxsnoop \
25 glxswapcontrol \
26 manywin \
27 offset \
28 overlay \
29 pbinfo \
30 pbdemo \
31 texture_from_pixmap \
32 wincopy \
33 xfont \
34 xrotfontdemo \
35 yuvrect_client
36
37 # omit this XMesa API demo: xdemo
38
39
40 ##### RULES #####
41
42 .SUFFIXES:
43 .SUFFIXES: .c
44
45 .c: $(LIB_DEP)
46 $(CC) -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
47
48
49 ##### TARGETS #####
50
51 default: $(PROGS)
52
53
54 clean:
55 -rm -f $(PROGS)
56 -rm -f *.o *~
57
58
59 # special cases
60 pbinfo: pbinfo.o pbutil.o
61 $(CC) $(LDFLAGS) pbinfo.o pbutil.o $(LIBS) -o $@
62
63 pbdemo: pbdemo.o pbutil.o
64 $(CC) $(LDFLAGS) pbdemo.o pbutil.o $(LIBS) -o $@
65
66 pbinfo.o: pbinfo.c pbutil.h
67 $(CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) pbinfo.c
68
69 pbdemo.o: pbdemo.c pbutil.h
70 $(CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) pbdemo.c
71
72 pbutil.o: pbutil.c pbutil.h
73 $(CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) pbutil.c
74
75 glxgears_fbconfig: glxgears_fbconfig.o pbutil.o
76 $(CC) $(LDFLAGS) glxgears_fbconfig.o pbutil.o $(LIBS) -o $@
77
78 glxgears_fbconfig.o: glxgears_fbconfig.c pbutil.h
79 $(CC) -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) -c -I. $(CFLAGS) glxgears_fbconfig.c
80
81 xrotfontdemo: xrotfontdemo.o xuserotfont.o
82 $(CC) $(LDFLAGS) xrotfontdemo.o xuserotfont.o $(LIBS) -o $@
83
84 xuserotfont.o: xuserotfont.c xuserotfont.h
85 $(CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) xuserotfont.c
86
87 xrotfontdemo.o: xrotfontdemo.c xuserotfont.h
88 $(CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) xrotfontdemo.c
89
90 corender: corender.o ipc.o
91 $(CC) $(CFLAGS) corender.o ipc.o $(LIBS) -o $@
92
93 corender.o: corender.c ipc.h
94 $(CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) corender.c
95
96 ipc.o: ipc.c ipc.h
97 $(CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) ipc.c