summaryrefslogtreecommitdiff
path: root/progs/glsl/Makefile
blob: fe2943d88dd354be355bc78ca293a36904a75d0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# progs/demos/Makefile

TOP = ../..
include $(TOP)/configs/current

INCDIR = $(TOP)/include

LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)

LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)

PROGS = \
	bitmap \
	brick \
	bump \
	deriv \
	mandelbrot \
	noise \
	points \
	texdemo1 \
	toyball \
	trirast


##### RULES #####

.SUFFIXES:
.SUFFIXES: .c


# make executable from .c file:
.c: $(LIB_DEP)
	$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@


##### TARGETS #####

default: $(PROGS)



##### Extra dependencies

extfuncs.h:  $(TOP)/progs/util/extfuncs.h
	cp $< .

readtex.c: $(TOP)/progs/util/readtex.c
	cp $< .

readtex.h: $(TOP)/progs/util/readtex.h
	cp $< .

readtex.o: readtex.c readtex.h
	$(CC) -c -I$(INCDIR) $(CFLAGS) readtex.c

bitmap.c: extfuncs.h

brick.c: extfuncs.h

bump.c: extfuncs.h

mandelbrot.c: extfuncs.h

points.c: extfuncs.h

toyball.c: extfuncs.h

texdemo1: texdemo1.o readtex.o
	$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) texdemo1.o readtex.o $(LIBS) -o $@

texdemo1.o: texdemo1.c readtex.h extfuncs.h
	$(CC) -c -I$(INCDIR) $(CFLAGS) texdemo1.c


clean:
	-rm -f $(PROGS)
	-rm -f *.o *~
	-rm -f extfuncs.h