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