blob: f413ed17edcd17f56fe2902fa2b21f34c74f0221 (
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
|
TOP = ../../..
default: linux-solo
MARK = $(TOP)/src/glut/glx
INCLUDES = -I$(TOP)/include -I$(MARK)
CORE_SOURCES = \
bitmap.c \
callback.c \
color.c \
globals.c \
init.c \
menu.c \
models.c \
overlay.c \
state.c \
teapot.c \
window.c
MARK_SOURCES = \
$(MARK)/glut_8x13.c \
$(MARK)/glut_9x15.c \
$(MARK)/glut_hel10.c \
$(MARK)/glut_hel12.c \
$(MARK)/glut_hel18.c \
$(MARK)/glut_tr10.c \
$(MARK)/glut_tr24.c
SOURCES = $(CORE_SOURCES) $(MARK_SOURCES)
OBJS = $(SOURCES:.c=.o)
LIBS = -L$(TOP)/lib -lGL -lGLU -lm
##### RULES #####
.c.o:
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
.S.o:
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
##### TARGETS #####
targets: depend libglut.so.3.7 install
libglut.so.3.7: $(OBJS) Makefile.solo
gcc -shared -Wl,-soname,libglut.so -Wl,-Bsymbolic $(OBJS) $(LIBS) -o $@
install: libglut.so.3.7
rm -f $(TOP)/lib/libglut.so*
install -D libglut.so.3.7 $(TOP)/lib/libglut.so.3.7
ln -s libglut.so.3.7 $(TOP)/lib/libglut.so.3
ln -s libglut.so.3 $(TOP)/lib/libglut.so
# Run 'make -f Makefile.solo dep' to update the dependencies if you change
# what's included by any source file.
depend: $(SOURCES)
makedepend -fdepend -Y $(INCLUDES) \
$(SOURCES)
# Emacs tags
tags:
etags `find . -name \*.[ch]` `find ../include`
# Remove .o and backup files
clean: depend
-rm -f *.o *~ *.o *~ *.so libglut.so.3.7
include $(TOP)/Make-config
include depend
|