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