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