Merge remote branch 'origin/master' into radeon-rewrite
[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 offset \
30 overlay \
31 pbinfo \
32 pbdemo \
33 sharedtex \
34 texture_from_pixmap \
35 wincopy \
36 xfont \
37 xrotfontdemo
38
39 # Don't build these by default because of extra library dependencies
40 EXTRA_PROGS = \
41 shape \
42 yuvrect_client \
43 xdemo
44
45
46
47 ##### RULES #####
48
49 .SUFFIXES:
50 .SUFFIXES: .c
51
52 .c: $(LIB_DEP)
53 $(APP_CC) -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
54
55
56 ##### TARGETS #####
57
58 default: $(PROGS)
59
60
61 extra: $(EXTRA_PROGS)
62
63
64 clean:
65 -rm -f $(PROGS) $(EXTRA_PROGS)
66 -rm -f *.o *~
67
68
69 # special cases
70 pbinfo: pbinfo.o pbutil.o
71 $(APP_CC) $(CFLAGS) $(LDFLAGS) pbinfo.o pbutil.o $(LIBS) -o $@
72
73 pbdemo: pbdemo.o pbutil.o
74 $(APP_CC) $(CFLAGS) $(LDFLAGS) pbdemo.o pbutil.o $(LIBS) -o $@
75
76 pbinfo.o: pbinfo.c pbutil.h
77 $(APP_CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) pbinfo.c
78
79 pbdemo.o: pbdemo.c pbutil.h
80 $(APP_CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) pbdemo.c
81
82 pbutil.o: pbutil.c pbutil.h
83 $(APP_CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) pbutil.c
84
85 glxgears_fbconfig: glxgears_fbconfig.o pbutil.o
86 $(APP_CC) $(CFLAGS) $(LDFLAGS) glxgears_fbconfig.o pbutil.o $(LIBS) -o $@
87
88 glxgears_fbconfig.o: glxgears_fbconfig.c pbutil.h
89 $(APP_CC) -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) -c -I. $(CFLAGS) glxgears_fbconfig.c
90
91 xrotfontdemo: xrotfontdemo.o xuserotfont.o
92 $(APP_CC) $(CFLAGS) $(LDFLAGS) xrotfontdemo.o xuserotfont.o $(LIBS) -o $@
93
94 xuserotfont.o: xuserotfont.c xuserotfont.h
95 $(APP_CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) xuserotfont.c
96
97 xrotfontdemo.o: xrotfontdemo.c xuserotfont.h
98 $(APP_CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) xrotfontdemo.c
99
100 corender: corender.o ipc.o
101 $(APP_CC) $(CFLAGS) corender.o ipc.o $(LIBS) -o $@
102
103 corender.o: corender.c ipc.h
104 $(APP_CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) corender.c
105
106 ipc.o: ipc.c ipc.h
107 $(APP_CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) ipc.c
108
109 yuvrect_client: yuvrect_client.c
110 $(APP_CC) -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) $< $(LDFLAGS) $(LIBS) -l$(GLU_LIB) -o $@
111