Small OpenGL based c++ rendering library
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. CC = g++
  2. AR = ar
  3. OBJECTS = segl.o punkt3d.o punkt2d.o emath.o emath_opengl.o color.o gldrawhelper.o glfontengine.o rect.o gltexture.o matrix.o quaternion.o rotationsmatrix.o glsdlscreen.o sdlfuncs.o fpsmanager.o glcamera.o catmullromspline.o extstring.o quader.o geotypes.o
  4. OBJOPT = -Wall -c -DVERSION=\"$(VERSION)\" -O2 `sdl-config --cflags`
  5. WINOPT = -Wall -c -DVERSION=\"$(VERSION)\" -O2 -I/usr/i586-mingw32msvc/include -I/usr/i586-mingw32msvc/include/SDL
  6. LIBLINK = -lc -shared -Wl,-soname,$(LIBNAME).so.$(LIBVERSION)
  7. WINLINK = -L/usr/i586-mingw32msvc/lib /usr/i586-mingw32msvc/lib/SDL_image.lib -lmingw32 -shared -mwindows -lGL -lGLU -lSDL -lSDL_image /usr/i586-mingw32msvc/lib/SDL_image.lib /usr/i586-mingw32msvc/lib/SDL_image.dll
  8. SUBDIRS = glgui glmenu model
  9. SUBDIROBJECTS = glgui/*.o glmenu/*.o model/*.o
  10. VERSION = 0.1.1
  11. LIBVERSION = 1
  12. LIBNAME = libsegl
  13. EXT = so.$(LIBVERSION)
  14. .PHONY: windows
  15. all: seglar lib
  16. seglar: $(OBJECTS) subdirs
  17. rm -f $(LIBNAME).a
  18. $(AR) rcs $(LIBNAME).a $(OBJECTS) $(SUBDIROBJECTS)
  19. # ranlib $(LIBNAME).a
  20. lib: LINKER = $(LINKER)
  21. lib: $(OBJECTS) subdirs
  22. $(CC) -o $(LIBNAME).$(EXT) $(OBJECTS) $(SUBDIROBJECTS) $(LIBLINK)
  23. subdirs:
  24. @for i in $(SUBDIRS); do $(MAKE) CC="$(CC)" AR="$(AR)" OBJOPT="$(OBJOPT)" -C $$i; done
  25. %.o: %.cpp %.h
  26. $(CC) $(OBJOPT) $<
  27. # this could probably fail..
  28. # thought to get segl.cpp rebuilded
  29. segl.o: $(OBJECTS:segl.o=)
  30. glgui/glgui.a:
  31. cd glgui; $(MAKE);
  32. glmenu/glmenu.a:
  33. cd glmenu; $(MAKE);
  34. testprog: seglar testprog.o
  35. g++ `sdl-config --libs` -lSDL_image -lGL -lGLU testprog.o -o testprog $(LIBNAME).a
  36. winlib: CC = i586-mingw32msvc-g++
  37. winlib: AR = i586-mingw32msvc-ar
  38. winlib: OBJOPT = $(WINOPT)
  39. winlib: LIBLINK = $(WINLINK)
  40. winlib: export EXT = dll
  41. winlib: lib
  42. winar: CC = i586-mingw32msvc-g++
  43. winar: AR = i586-mingw32msvc-ar
  44. winar: OBJOPT = $(WINOPT)
  45. winar: LIBLINK = $(WINLINK)
  46. winar: export EXT = dll
  47. winar: seglar
  48. cleansubdirs:
  49. @for i in $(SUBDIRS); do $(MAKE) clean -C $$i; done
  50. clean: cleansubdirs
  51. rm -f $(OBJECTS)
  52. # cd glgui; $(MAKE) clean
  53. # cd glmenu; $(MAKE) clean
  54. @echo Done cleaning...