Merge commit 'origin/gallium-master-merge'
[mesa.git] / progs / samples / Makefile
1 # progs/samples/Makefile
2
3 TOP = ../..
4 include $(TOP)/configs/current
5
6 INCDIR = $(TOP)/include
7
8 LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
9
10 LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLEW_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
11
12 PROGS = accum bitmap1 bitmap2 blendeq blendxor copy cursor depth eval fog \
13 font line logo nurb olympic overlay point prim quad select \
14 shape sphere star stencil stretch texture tri wave
15
16
17 ##### RULES #####
18
19 .SUFFIXES:
20 .SUFFIXES: .c
21
22 .c: $(LIB_DEP)
23 $(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
24
25
26 ##### TARGETS #####
27
28 default: $(PROGS)
29
30
31 sphere: sphere.o readtex.o
32 $(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) sphere.o readtex.o $(LIBS) -o $@
33
34 sphere.o: sphere.c readtex.h
35 $(APP_CC) -c -I$(INCDIR) $(CFLAGS) sphere.c
36
37 readtex.c: $(TOP)/progs/util/readtex.c
38 cp $< .
39
40 readtex.h: $(TOP)/progs/util/readtex.h
41 cp $< .
42
43 readtex.o: readtex.c readtex.h
44 $(APP_CC) -c -I$(INCDIR) $(CFLAGS) $< -o $@
45
46
47 clean:
48 -rm -f $(PROGS)
49 -rm -f *.o *~
50 -rm -f readtex.c readtex.h