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