forked from libglui/glui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
170 lines (132 loc) · 5.02 KB
/
makefile
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
.SUFFIXES: .cpp
#for sgi -- comment out the lines below to use on HP
#CC=CC -g0 -o32
#CC=gcc
# Compiler options
OPTS=-g
OPTS=-O0
#OPTS=-O2
UNAME = $(shell uname)
CPPFLAGS+=-std=c++11
ifeq ($(UNAME), Linux)
CXX ?= g++
CPPFLAGS += $(OPTS) -Wall -pedantic
LIBGL = -lGLU -lGL
LIBS = -lXmu -lXext -lX11 -lXi -lm
# One of the following options only...
# (1) OpenGLUT
# LIBGLUT = -L/usr/X11R6/lib -lopenglut
# CPPFLAGS += -I/usr/X11R6/include -DGLUI_OPENGLUT
# (2) FreeGLUT
# LIBGLUT = -L/usr/X11R6/lib -lfreeglut
# CPPFLAGS += -I/usr/X11R6/include -DGLUI_FREEGLUT
# (3) GLUT
LIBGLUT = -L/usr/X11R6/lib -lglut
CPPFLAGS += -I/usr/X11R6/include
endif
ifeq ($(UNAME), Darwin)
CXX ?= g++
CPPFLAGS += $(OPTS) -Wall -pedantic
LIBGL = -framework OpenGL
LIBGLUT = -framework GLUT
endif
#######################################
CPPFLAGS += -I./ -I./include
LIBGLUI = -L./lib -lglui
#######################################
GLUI_OBJS = glui_add_controls.o glui.o glui_bitmaps.o glui_button.o glui_edittext.o glui_commandline.o glui_checkbox.o glui_node.o glui_radio.o glui_statictext.o glui_panel.o glui_separator.o glui_spinner.o glui_control.o glui_column.o glui_translation.o glui_rotation.o glui_mouse_iaction.o glui_listbox.o glui_rollout.o glui_window.o arcball.o algebra3.o quaternion.o viewmodel.o glui_treepanel.o glui_tree.o glui_textbox.o glui_scrollbar.o glui_list.o glui_filebrowser.o
GLUI_LIB = lib/libglui.a
GLUI_EXAMPLES = bin/example1 bin/example2 bin/example3 bin/example4 bin/example5 bin/example6
GLUI_TOOLS = bin/ppm2array
.PHONY: all setup examples tools clean depend doc doc-pdf doc-dist dist
all: setup $(GLUI_LIB) examples tools
setup:
mkdir -p bin
mkdir -p lib
examples: $(GLUI_EXAMPLES)
tools: $(GLUI_TOOLS)
bin/ppm2array: tools/ppm2array.cpp tools/ppm.cpp
$(CXX) $(CPPFLAGS) -o $@ $^
bin/%: example/%.cpp $(GLUI_LIB)
$(CXX) $(CPPFLAGS) -o $@ $< $(LIBGLUI) $(LIBGLUT) $(LIBGL) $(LIBS)
$(GLUI_LIB): $(GLUI_OBJS)
ar -r $(GLUI_LIB) $(GLUI_OBJS)
.cpp.o:
$(CXX) $(CPPFLAGS) -c $<
.c.o:
$(CXX) $(CPPFLAGS) -c $<
docs:
doxygen doc/doxygen.cfg
clean:
rm -f *.o $(GLUI_LIB) $(GLUI_EXAMPLES) $(GLUI_TOOLS)
rm -fr doc/doxygen
depend:
makedepend -Y./include `find -name "*.cpp"` `find -name "*.c"`
DIST = glui-2.35
doc:
doxygen doc/doxygen.cfg
doc-pdf:
cd doc/doxygen/latex && pdflatex refman.tex && pdflatex refman.tex && pdflatex refman.tex
doc-dist:
mkdir -p $(DIST)/doc
cp `find doc/doxygen/html -type f` $(DIST)/doc
tar cv $(DIST) | gzip -9 - > $(DIST)-doc.tgz
zip -vr9 $(DIST)-doc.zip $(DIST)
rm -Rf $(DIST)
dist: clean
mkdir -p $(DIST)
cp --parents \
`find -type f -name "*.cpp"` \
`find -type f -name "*.c"` \
`find -type f -name "*.h"` \
`find -type f -name "*.dev"` \
`find -type f -name "*.dsp"` \
`find -type f -name "*.dsw"` \
`find -type f -name "*.vcproj"` \
`find -type f -name "*.sln"` \
`find -type f -name "*.txt"` \
makefile \
$(DIST)
tar cv $(DIST) | gzip -9 - > $(DIST).tgz
rm -Rf $(DIST)
# DO NOT DELETE THIS LINE -- make depend depends on it.
./algebra3.o: algebra3.h glui_internal.h
./arcball.o: arcball.h glui_internal.h algebra3.h quaternion.h
./glui_button.o: ./include/GL/glui.h glui_internal.h
./glui_checkbox.o: ./include/GL/glui.h glui_internal.h
./glui_column.o: ./include/GL/glui.h glui_internal.h
./glui_control.o: ./include/GL/glui.h glui_internal.h
./glui_edittext.o: ./include/GL/glui.h glui_internal.h
./glui_listbox.o: ./include/GL/glui.h glui_internal.h
./glui_mouse_iaction.o: ./include/GL/glui.h glui_internal.h
./glui_node.o: ./include/GL/glui.h glui_internal.h
./glui_panel.o: ./include/GL/glui.h glui_internal.h
./glui_radio.o: ./include/GL/glui.h glui_internal.h
./glui_rollout.o: ./include/GL/glui.h glui_internal.h
./glui_rotation.o: ./include/GL/glui.h arcball.h glui_internal.h algebra3.h
./glui_rotation.o: quaternion.h
./glui_separator.o: ./include/GL/glui.h glui_internal.h
./glui_spinner.o: ./include/GL/glui.h glui_internal.h
./glui_translation.o: ./include/GL/glui.h glui_internal.h algebra3.h
./glui_window.o: ./include/GL/glui.h glui_internal.h
./quaternion.o: quaternion.h algebra3.h glui_internal.h
./viewmodel.o: viewmodel.h algebra3.h ./include/GL/glui.h
./glui_bitmaps.o: ./include/GL/glui.h glui_internal.h
./glui_statictext.o: ./include/GL/glui.h glui_internal.h
./glui.o: ./include/GL/glui.h glui_internal.h
./glui_add_controls.o: ./include/GL/glui.h glui_internal.h
./glui_commandline.o: ./include/GL/glui.h glui_internal.h
./glui_list.o: ./include/GL/glui.h glui_internal.h
./glui_scrollbar.o: ./include/GL/glui.h glui_internal.h
./glui_string.o: ./include/GL/glui.h
./glui_textbox.o: ./include/GL/glui.h glui_internal.h
./glui_tree.o: ./include/GL/glui.h glui_internal.h
./glui_treepanel.o: ./include/GL/glui.h
./example/example1.o: ./include/GL/glui.h
./example/example2.o: ./include/GL/glui.h
./example/example3.o: ./include/GL/glui.h
./example/example4.o: ./include/GL/glui.h
./example/example5.o: ./include/GL/glui.h
./example/example6.o: ./include/GL/glui.h
./tools/ppm2array.o: ./tools/ppm.hpp
./glui_filebrowser.o: ./include/GL/glui.h glui_internal.h