2663015b2c7b315a266f6bf41d5038907651fb86
[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 += $(X11_LIBS) -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 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 .o: $(LIB_DEP)
57 $(APP_CC) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
58
59 .c.o:
60 $(APP_CC) -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) $< -c -o $@
61
62
63 ##### TARGETS #####
64
65 default: $(PROGS)
66
67 $(PROGS): $(PROGS:%=%.o)
68
69 extra: $(EXTRA_PROGS)
70
71
72 clean:
73 -rm -f $(PROGS) $(EXTRA_PROGS)
74 -rm -f *.o *~
75
76
77 # special cases
78 pbutil.o: pbutil.h
79 pbinfo.o: pbutil.h
80 pbinfo: pbinfo.o pbutil.o
81 $(APP_CC) $(CFLAGS) $(LDFLAGS) pbinfo.o pbutil.o $(LIBS) -o $@
82
83 pbdemo.o: pbutil.h
84 pbdemo: pbdemo.o pbutil.o
85 $(APP_CC) $(CFLAGS) $(LDFLAGS) pbdemo.o pbutil.o $(LIBS) -o $@
86
87 glxgears_fbconfig.o: pbutil.h
88 glxgears_fbconfig: glxgears_fbconfig.o pbutil.o
89 $(APP_CC) $(CFLAGS) $(LDFLAGS) glxgears_fbconfig.o pbutil.o $(LIBS) -o $@
90
91 xuserotfont.o: xuserotfont.h
92 xrotfontdemo.o: xuserotfont.h
93 xrotfontdemo: xrotfontdemo.o xuserotfont.o
94 $(APP_CC) $(CFLAGS) $(LDFLAGS) xrotfontdemo.o xuserotfont.o $(LIBS) -o $@
95
96 ipc.o: ipc.h
97 corender.o: ipc.h
98 corender: corender.o ipc.o
99 $(APP_CC) $(CFLAGS) $(LDFLAGS) corender.o ipc.o $(LIBS) -o $@
100
101 yuvrect_client: yuvrect_client.o
102 $(APP_CC) $(CFLAGS) $< $(LDFLAGS) $(LIBS) -l$(GLU_LIB) -o $@
103