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 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. CC = g++
  2. AR = ar
  3. OBJECTS = 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
  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. seglar: $(OBJECTS) subdirs
  16. rm -f $(LIBNAME).a
  17. $(AR) rcs $(LIBNAME).a $(OBJECTS) $(SUBDIROBJECTS)
  18. # ranlib $(LIBNAME).a
  19. lib: LINKER = $(LINKER)
  20. lib: $(OBJECTS) subdirs
  21. $(CC) -o $(LIBNAME).$(EXT) $(OBJECTS) $(SUBDIROBJECTS) $(LIBLINK)
  22. subdirs:
  23. @for i in $(SUBDIRS); do $(MAKE) CC="$(CC)" AR="$(AR)" OBJOPT="$(OBJOPT)" -C $$i; done
  24. %.o: %.cpp %.h
  25. $(CC) $(OBJOPT) $<
  26. glgui/glgui.a:
  27. cd glgui; $(MAKE);
  28. glmenu/glmenu.a:
  29. cd glmenu; $(MAKE);
  30. testprog: seglar testprog.o
  31. g++ `sdl-config --libs` -lSDL_image -lGL -lGLU testprog.o -o testprog $(LIBNAME).a
  32. winlib: CC = i586-mingw32msvc-g++
  33. winlib: AR = i586-mingw32msvc-ar
  34. winlib: OBJOPT = $(WINOPT)
  35. winlib: LIBLINK = $(WINLINK)
  36. winlib: export EXT = dll
  37. winlib: lib
  38. winar: CC = i586-mingw32msvc-g++
  39. winar: AR = i586-mingw32msvc-ar
  40. winar: OBJOPT = $(WINOPT)
  41. winar: LIBLINK = $(WINLINK)
  42. winar: export EXT = dll
  43. winar: seglar
  44. cleansubdirs:
  45. @for i in $(SUBDIRS); do $(MAKE) clean -C $$i; done
  46. clean: cleansubdirs
  47. rm -f $(OBJECTS)
  48. # cd glgui; $(MAKE) clean
  49. # cd glmenu; $(MAKE) clean
  50. @echo Done cleaning...