Lines 1-101
Link Here
|
1 |
|
1 |
VERSION = 2.1 |
2 |
.SUFFIXES: .cpp |
2 |
MAJOR = 2 |
3 |
|
3 |
LIBNAME = libglui |
4 |
|
4 |
NAME = glui |
5 |
#Change the following two lines to reflect the locations |
5 |
SONAME = $(LIBNAME).so.$(MAJOR) |
6 |
# of the GLUT library (.a) and includes on your system |
6 |
|
7 |
|
7 |
CC = gcc |
8 |
GLUT_LIB_LOCATION=/unc/walk/lib/sgi_irix |
8 |
CXX = g++ |
9 |
GLUT_INC_LOCATION=/unc/walk/include |
9 |
|
10 |
|
10 |
CPPFLAGS = $(INCS) |
11 |
CFLAGS = |
11 |
CFLAGS = |
12 |
|
12 |
CXXFLAGS = |
13 |
|
13 |
LDFLAGS = |
14 |
#for sgi -- comment out the lines below to use on HP |
14 |
LDLIBS = $(LIBS) |
15 |
CC=CC -g0 -o32 |
15 |
|
16 |
#CC=gcc |
16 |
GLLIBS = -lGL -lGLU -lglut |
17 |
#CC=g++ -O3 |
17 |
INCS = |
18 |
CPPFLAGS=-I${GLUT_INC_LOCATION} #-w |
18 |
LIBS = $(GLLIBS) -lm |
19 |
GLLIBS=-L${GLUT_LIB_LOCATION} -lglut -lGL -lGLU |
19 |
|
20 |
LPATH=${GLUTPATH} |
20 |
LIBGLUI = -L./lib/ -lglui |
21 |
INCS= |
21 |
|
22 |
|
22 |
GLUI = lib/$(LIBNAME).a |
23 |
|
23 |
SO_GLUI = lib/$(LIBNAME).so.0 |
24 |
libs = ${GLLIBS} -lXmu -lXext -lX11 -lXi -lm #-lmalloc |
24 |
|
25 |
|
25 |
RM = rm -rf |
26 |
LIBGLUI= -Llib -lglui |
26 |
|
27 |
|
27 |
EXAMPLES = bin/example1 bin/example2 bin/example3 bin/example4 bin/example5 |
28 |
All: lib/libglui.a bin/example1 bin/example2 bin/example3 bin/example4 bin/example5 |
28 |
EXAMPLES_SRC = $(wildcard example*.cpp) |
29 |
|
29 |
|
30 |
GLUI_OBJS = glui_add_controls.o glui.o glui_bitmap_img_data.o glui_bitmaps.o glui_button.o glui_edittext.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 arcball.o algebra3.o quaternion.o |
30 |
all: static shared examples |
31 |
|
31 |
static: $(GLUI) |
32 |
bin/example1: $(GLUI_OBJS) example1.o lib/libglui.a |
32 |
shared: $(SO_GLUI) |
33 |
@echo "Linking example1" |
33 |
examples: $(EXAMPLES) |
34 |
$(CC) $(CFLAG) $(CPPFLAGS) $(LPATH) example1.o $(LIBGLUI) $(libs) -o bin/example1 |
34 |
|
35 |
|
35 |
GLUI_SRCS = algebra3.cpp arcball.cpp $(wildcard glui*.cpp) quaternion.cpp |
36 |
bin/example2: $(GLUI_OBJS) example2.o lib/libglui.a |
36 |
GLUI_HDRS = $(wildcard glui*.h) |
37 |
@echo "Linking example2" |
37 |
GLUI_OBJS = $(GLUI_SRCS:.cpp=.o) |
38 |
$(CC) $(CFLAG) $(CPPFLAGS) $(LPATH) example2.o $(LIBGLUI) $(libs) -o bin/example2 |
38 |
|
39 |
|
39 |
install: all |
40 |
bin/example3: $(GLUI_OBJS) example3.o lib/libglui.a |
40 |
install $(GLUI) /usr/lib |
41 |
@echo "Linking example3" |
41 |
install $(SO_GLUI) /usr/lib |
42 |
$(CC) $(CFLAG) $(CPPFLAGS) $(LPATH) example3.o $(LIBGLUI) $(libs) -o bin/example3 |
42 |
install $(GLUI_HDRS) /usr/include/gl |
43 |
|
43 |
install -D $(EXAMPLES) /usr/share/${NAME}/bin |
44 |
bin/example4: $(GLUI_OBJS) example4.o lib/libglui.a |
44 |
install -D $(EXAMPLES_SRC) /usr/share/${NAME}/src |
45 |
@echo "Linking example4" |
45 |
|
46 |
$(CC) $(CFLAG) $(CPPFLAGS) $(LPATH) example4.o $(LIBGLUI) $(libs) -o bin/example4 |
46 |
$(GLUI): $(GLUI_OBJS) |
47 |
|
47 |
@echo "Creating library" |
48 |
bin/example5: $(GLUI_OBJS) example5.o lib/libglui.a |
48 |
test -d $(dir $@) || mkdir -p $(dir $@) |
49 |
@echo "Linking example5" |
49 |
ar -r $@ $^ |
50 |
$(CC) $(CFLAG) $(CPPFLAGS) $(LPATH) example5.o $(LIBGLUI) $(libs) -o bin/example5 |
50 |
|
51 |
|
51 |
$(SO_GLUI): $(GLUI_OBJS) |
52 |
lib/libglui.a: $(GLUI_OBJS) |
52 |
@echo "Creating shared library" |
53 |
@echo "Creating library" |
53 |
test -d $(dir $@) || mkdir -p $(dir $@) |
54 |
ar -r lib/libglui.a $(GLUI_OBJS) |
54 |
$(CXX) -o $@ -shared -Wl,-soname,$(SONAME) $^ $(LDLIBS) |
55 |
|
55 |
|
56 |
.cpp.o: |
56 |
bin/example%: example%.o $(GLUI) |
57 |
$(CC) -c $(CFLAGS) $(CPPFLAGS) $(INCS) $*.cpp |
57 |
@echo "Creating Examples" |
58 |
|
58 |
test -d $(dir $@) || mkdir -p $(dir $@) |
59 |
.c.o: |
59 |
$(CXX) $(LDFLAGS) $(LDLIBS) $< $(LIBGLUI) -o $@ |
60 |
$(CC) -c $(CFLAGS) $(CPPFLAGS) $(INCS) $*.c |
60 |
|
61 |
clean: |
61 |
.cpp.o: |
62 |
/bin/rm *.o |
62 |
$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) $(INCS) $< |
63 |
|
63 |
|
64 |
|
64 |
.c.o: |
65 |
|
65 |
$(CC) -c $(CFLAGS) $(CPPFLAGS) $(INCS) $< |
66 |
algebra3.o: algebra3.h |
66 |
|
67 |
arcball.o: arcball.h algebra3.h quaternion.h stdinc.h |
67 |
clean: |
68 |
example1.o: glui.h |
68 |
$(RM) *.o |
69 |
example2.o: glui.h |
69 |
$(RM) bin/* lib/ |
70 |
example3.o: glui.h |
70 |
$(RM) tags *~ |
71 |
example4.o: glui.h |
71 |
|
72 |
glui.o: glui.h stdinc.h |
72 |
.SUFFIXES: .cpp |
73 |
glui_add_controls.o: glui.h stdinc.h |
73 |
.PHONY: all static shared example |
74 |
glui_bitmap_img_data.o: glui_img_checkbox_0.c glui_img_checkbox_1.c |
74 |
|
75 |
glui_bitmap_img_data.o: glui_img_radiobutton_0.c glui_img_radiobutton_1.c |
75 |
algebra3.o: algebra3.h |
76 |
glui_bitmap_img_data.o: glui_img_uparrow.c glui_img_downarrow.c |
76 |
arcball.o: arcball.h algebra3.h quaternion.h |
77 |
glui_bitmap_img_data.o: glui_img_leftarrow.c glui_img_rightarrow.c |
77 |
glui.o: glui.h |
78 |
glui_bitmap_img_data.o: glui_img_spinup_1.c glui_img_spinup_0.c |
78 |
glui_add_controls.o: glui.h |
79 |
glui_bitmap_img_data.o: glui_img_spindown_1.c glui_img_spindown_0.c |
79 |
glui_bitmap_img_data.o: glui_img_checkbox_0.c glui_img_checkbox_1.c |
80 |
glui_bitmap_img_data.o: glui_img_checkbox_0_dis.c glui_img_checkbox_1_dis.c |
80 |
glui_bitmap_img_data.o: glui_img_radiobutton_0.c glui_img_radiobutton_1.c |
81 |
glui_bitmap_img_data.o: glui_img_radiobutton_0_dis.c |
81 |
glui_bitmap_img_data.o: glui_img_uparrow.c glui_img_downarrow.c |
82 |
glui_bitmap_img_data.o: glui_img_radiobutton_1_dis.c glui_img_spinup_dis.c |
82 |
glui_bitmap_img_data.o: glui_img_leftarrow.c glui_img_rightarrow.c |
83 |
glui_bitmap_img_data.o: glui_img_spindown_dis.c |
83 |
glui_bitmap_img_data.o: glui_img_spinup_1.c glui_img_spinup_0.c |
84 |
glui_bitmaps.o: glui.h stdinc.h |
84 |
glui_bitmap_img_data.o: glui_img_spindown_1.c glui_img_spindown_0.c |
85 |
glui_button.o: glui.h stdinc.h |
85 |
glui_bitmap_img_data.o: glui_img_checkbox_0_dis.c glui_img_checkbox_1_dis.c |
86 |
glui_checkbox.o: glui.h stdinc.h |
86 |
glui_bitmap_img_data.o: glui_img_radiobutton_0_dis.c |
87 |
glui_column.o: glui.h stdinc.h |
87 |
glui_bitmap_img_data.o: glui_img_radiobutton_1_dis.c glui_img_spinup_dis.c |
88 |
glui_control.o: glui.h stdinc.h |
88 |
glui_bitmap_img_data.o: glui_img_spindown_dis.c |
89 |
glui_edittext.o: glui.h stdinc.h |
89 |
glui_bitmaps.o: glui.h |
90 |
glui_node.o: glui.h stdinc.h |
90 |
glui_button.o: glui.h |
91 |
glui_panel.o: glui.h stdinc.h |
91 |
glui_checkbox.o: glui.h |
92 |
glui_radio.o: glui.h stdinc.h |
92 |
glui_column.o: glui.h |
93 |
glui_separator.o: glui.h stdinc.h |
93 |
glui_control.o: glui.h |
94 |
glui_spinner.o: glui.h stdinc.h |
94 |
glui_edittext.o: glui.h |
95 |
glui_statictext.o: glui.h stdinc.h |
95 |
glui_node.o: glui.h |
96 |
quaternion.o: quaternion.h algebra3.h stdinc.h |
96 |
glui_panel.o: glui.h |
97 |
glui_translation.o: glui.h stdinc.h |
97 |
glui_radio.o: glui.h |
98 |
glui_rotation.o: glui.h stdinc.h |
98 |
glui_separator.o: glui.h |
99 |
glui_mouse_iaction.o: glui.h stdinc.h |
99 |
glui_spinner.o: glui.h |
100 |
glui_listbox.o: glui.h stdinc.h |
100 |
glui_statictext.o: glui.h |
101 |
glui_rollout.o: glui.h stdinc.h |
101 |
quaternion.o: quaternion.h algebra3.h |
|
|
102 |
glui_translation.o: glui.h |
103 |
glui_rotation.o: glui.h |
104 |
glui_mouse_iaction.o: glui.h |
105 |
glui_listbox.o: glui.h |