Merge commit 'origin/gallium-0.1' into gallium-0.2
[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)
10
11 LIBS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(APP_LIB_DEPS)
12
13 PROGS = \
14 corender \
15 glthreads \
16 glxdemo \
17 glxgears \
18 glxgears_fbconfig \
19 glxgears_pixmap \
20 glxcontexts \
21 glxheads \
22 glxinfo \
23 glxpixmap \
24 glxpbdemo \
25 glxsnoop \
26 glxswapcontrol \
27 manywin \
28 offset \
29 overlay \
30 pbinfo \
31 pbdemo \
32 sharedtex \
33 texture_from_pixmap \
34 wincopy \
35 xfont \
36 xrotfontdemo
37
38 # Don't build these by default because of extra library dependencies
39 EXTRA_PROGS = \
40 shape \
41 yuvrect_client \
42 xdemo
43
44
45
46 ##### RULES #####
47
48 .SUFFIXES:
49 .SUFFIXES: .c
50
51 .c: $(LIB_DEP)
52 $(APP_CC) -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
53
54
55 ##### TARGETS #####
56
57 default: $(PROGS)
58
59
60 extra: $(EXTRA_PROGS)
61
62
63 clean:
64 -rm -f $(PROGS) $(EXTRA_PROGS)
65 -rm -f *.o *~
66
67
68 # special cases
69 pbinfo: pbinfo.o pbutil.o
70 $(APP_CC) $(CFLAGS) $(LDFLAGS) pbinfo.o pbutil.o $(LIBS) -o $@
71
72 pbdemo: pbdemo.o pbutil.o
73 $(APP_CC) $(CFLAGS) $(LDFLAGS) pbdemo.o pbutil.o $(LIBS) -o $@
74
75 pbinfo.o: pbinfo.c pbutil.h
76 $(APP_CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) pbinfo.c
77
78 pbdemo.o: pbdemo.c pbutil.h
79 $(APP_CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) pbdemo.c
80
81 pbutil.o: pbutil.c pbutil.h
82 $(APP_CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) pbutil.c
83
84 glxgears_fbconfig: glxgears_fbconfig.o pbutil.o
85 $(APP_CC) $(CFLAGS) $(LDFLAGS) glxgears_fbconfig.o pbutil.o $(LIBS) -o $@
86
87 glxgears_fbconfig.o: glxgears_fbconfig.c pbutil.h
88 $(APP_CC) -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) -c -I. $(CFLAGS) glxgears_fbconfig.c
89
90 xrotfontdemo: xrotfontdemo.o xuserotfont.o
91 $(APP_CC) $(CFLAGS) $(LDFLAGS) xrotfontdemo.o xuserotfont.o $(LIBS) -o $@
92
93 xuserotfont.o: xuserotfont.c xuserotfont.h
94 $(APP_CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) xuserotfont.c
95
96 xrotfontdemo.o: xrotfontdemo.c xuserotfont.h
97 $(APP_CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) xrotfontdemo.c
98
99 corender: corender.o ipc.o
100 $(APP_CC) $(CFLAGS) corender.o ipc.o $(LIBS) -o $@
101
102 corender.o: corender.c ipc.h
103 $(APP_CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) corender.c
104
105 ipc.o: ipc.c ipc.h
106 $(APP_CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) ipc.c
107
108 yuvrect_client: yuvrect_client.c
109 $(APP_CC) -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) $< $(LDFLAGS) $(LIBS) -l$(GLU_LIB) -o $@
110