add support for LDFLAGS env var
[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) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME)
10
11 PROGS = glthreads \
12 glxdemo \
13 glxgears \
14 glxgears_fbconfig \
15 glxcontexts \
16 glxheads \
17 glxinfo \
18 glxpixmap \
19 glxpbdemo \
20 glxswapcontrol \
21 manywin \
22 offset \
23 overlay \
24 pbinfo \
25 pbdemo \
26 texture_from_pixmap \
27 wincopy \
28 xfont \
29 xrotfontdemo \
30 yuvrect_client
31
32 # omit this XMesa API demo: xdemo
33
34
35 ##### RULES #####
36
37 .SUFFIXES:
38 .SUFFIXES: .c
39
40 .c: $(LIB_DEP)
41 $(CC) -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(APP_LIB_DEPS) -o $@
42
43
44 ##### TARGETS #####
45
46 default: $(PROGS)
47
48
49 clean:
50 -rm -f $(PROGS)
51 -rm -f *.o *~
52
53
54 # special cases
55 pbinfo: pbinfo.o pbutil.o
56 $(CC) $(LDFLAGS) pbinfo.o pbutil.o $(APP_LIB_DEPS) -o $@
57
58 pbdemo: pbdemo.o pbutil.o
59 $(CC) $(LDFLAGS) pbdemo.o pbutil.o $(APP_LIB_DEPS) -o $@
60
61 pbinfo.o: pbinfo.c pbutil.h
62 $(CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) pbinfo.c
63
64 pbdemo.o: pbdemo.c pbutil.h
65 $(CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) pbdemo.c
66
67 pbutil.o: pbutil.c pbutil.h
68 $(CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) pbutil.c
69
70 glxgears_fbconfig: glxgears_fbconfig.o pbutil.o
71 $(CC) $(LDFLAGS) glxgears_fbconfig.o pbutil.o $(APP_LIB_DEPS) -o $@
72
73 glxgears_fbconfig.o: glxgears_fbconfig.c pbutil.h
74 $(CC) -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) -c -I. $(CFLAGS) glxgears_fbconfig.c
75
76 xrotfontdemo: xrotfontdemo.o xuserotfont.o
77 $(CC) $(LDFLAGS) xrotfontdemo.o xuserotfont.o $(APP_LIB_DEPS) -o $@
78
79 xuserotfont.o: xuserotfont.c xuserotfont.h
80 $(CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) xuserotfont.c
81
82 xrotfontdemo.o: xrotfontdemo.c xuserotfont.h
83 $(CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) xrotfontdemo.c
84