--- glui_v2_2.orig/example1.cpp +++ glui_v2_2/example1.cpp @@ -85,7 +85,7 @@ /**************************************** main() ********************/ -void main(int argc, char* argv[]) +int main(int argc, char* argv[]) { /****************************************/ /* Initialize GLUT and create window */ @@ -136,6 +136,8 @@ GLUI_Master.set_glutIdleFunc( myGlutIdle ); glutMainLoop(); + + return 0; } --- glui_v2_2.orig/example2.cpp +++ glui_v2_2/example2.cpp @@ -181,7 +181,7 @@ /**************************************** main() ********************/ -void main(int argc, char* argv[]) +int main(int argc, char* argv[]) { /****************************************/ /* Initialize GLUT and create window */ @@ -244,4 +244,6 @@ GLUI_Master.set_glutIdleFunc( myGlutIdle ); glutMainLoop(); + + return 0; } --- glui_v2_2.orig/example3.cpp +++ glui_v2_2/example3.cpp @@ -263,7 +263,7 @@ /**************************************** main() ********************/ -void main(int argc, char* argv[]) +int main(int argc, char* argv[]) { /****************************************/ /* Initialize GLUT and create window */ @@ -392,5 +392,7 @@ /**** Regular GLUT main loop ****/ glutMainLoop(); + + return 0; } --- glui_v2_2.orig/example4.cpp +++ glui_v2_2/example4.cpp @@ -253,7 +253,7 @@ /**************************************** main() ********************/ -void main(int argc, char* argv[]) +int main(int argc, char* argv[]) { /****************************************/ /* Initialize GLUT and create window */ @@ -371,5 +371,7 @@ /**** Regular GLUT main loop ****/ glutMainLoop(); + + return 0; } --- glui_v2_2.orig/example5.cpp +++ glui_v2_2/example5.cpp @@ -310,7 +310,7 @@ /**************************************** main() ********************/ -void main(int argc, char* argv[]) +int main(int argc, char* argv[]) { /****************************************/ /* Initialize GLUT and create window */ @@ -478,5 +478,7 @@ /**** Regular GLUT main loop ****/ glutMainLoop(); + + return 0; } --- glui_v2_2.orig/Makefile +++ glui_v2_2/Makefile @@ -0,0 +1,97 @@ +VERSION = 2.2 +MAJOR = 2 +LIBNAME = libglui +SONAME = $(LIBNAME).so.$(MAJOR) + +CC = cc +CXX = c++ + +CPPFLAGS = $(INCS) +CFLAGS = +CXXFLAGS = +LDFLAGS = +LDLIBS = $(LIBS) + +GLLIBS = -lGL -lGLU -lglut +INCS = +LIBS = $(GLLIBS) -lm + +LIBGLUI = -Llib -lglui + +GLUI = lib/$(LIBNAME).a +SO_GLUI = lib/$(LIBNAME).so.$(VERSION) + +EXAMPLES = bin/example1 bin/example2 bin/example3 bin/example4 bin/example5 + +all: static shared examples +static: $(GLUI) +shared: $(SO_GLUI) +examples: $(EXAMPLES) + +GLUI_SRCS = algebra3.cpp arcball.cpp $(wildcard glui*.cpp) quaternion.cpp +GLUI_OBJS = $(GLUI_SRCS:.cpp=.o) + +$(GLUI): $(GLUI_OBJS) + @echo "Creating library" + test -d $(dir $@) || mkdir -p $(dir $@) + ar -r $@ $^ + +$(SO_GLUI): $(GLUI_OBJS) + @echo "Creating shared library" + $(CXX) -o $@ -shared -Wl,-soname,$(SONAME) $^ $(LDLIBS) + +bin/example%: example%.o $(GLUI) + @echo Linking $(notdir $@) + test -d $(dir $@) || mkdir -p $(dir $@) + $(CXX) $(LDFLAGS) $(LDLIBS) $< $(LIBGLUI) -o $@ + +.cpp.o: + $(CXX) -c $(CXXFLAGS) $(CPPFLAGS) $(INCS) $< + +.c.o: + $(CC) -c $(CFLAGS) $(CPPFLAGS) $(INCS) $< + +clean: + $(RM) *.o + $(RM) -r bin libs + $(RM) tags *~ + +.SUFFIXES: .cpp +.PHONY: all static shared examples + +algebra3.o: algebra3.h +arcball.o: arcball.h algebra3.h quaternion.h +example1.o: glui.h +example2.o: glui.h +example3.o: glui.h +example4.o: glui.h +glui.o: glui.h +glui_add_controls.o: glui.h +glui_bitmap_img_data.o: glui_img_checkbox_0.c glui_img_checkbox_1.c +glui_bitmap_img_data.o: glui_img_radiobutton_0.c glui_img_radiobutton_1.c +glui_bitmap_img_data.o: glui_img_uparrow.c glui_img_downarrow.c +glui_bitmap_img_data.o: glui_img_leftarrow.c glui_img_rightarrow.c +glui_bitmap_img_data.o: glui_img_spinup_1.c glui_img_spinup_0.c +glui_bitmap_img_data.o: glui_img_spindown_1.c glui_img_spindown_0.c +glui_bitmap_img_data.o: glui_img_checkbox_0_dis.c glui_img_checkbox_1_dis.c +glui_bitmap_img_data.o: glui_img_radiobutton_0_dis.c +glui_bitmap_img_data.o: glui_img_radiobutton_1_dis.c glui_img_spinup_dis.c +glui_bitmap_img_data.o: glui_img_spindown_dis.c +glui_bitmaps.o: glui.h +glui_button.o: glui.h +glui_checkbox.o: glui.h +glui_column.o: glui.h +glui_control.o: glui.h +glui_edittext.o: glui.h +glui_node.o: glui.h +glui_panel.o: glui.h +glui_radio.o: glui.h +glui_separator.o: glui.h +glui_spinner.o: glui.h +glui_statictext.o: glui.h +quaternion.o: quaternion.h algebra3.h +glui_translation.o: glui.h +glui_rotation.o: glui.h +glui_mouse_iaction.o: glui.h +glui_listbox.o: glui.h +glui_rollout.o: glui.h