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