Simple game engine with complete export to scripting language
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.
 
 
 

42 lines
1010 B

  1. ifdef RELEASE
  2. # RELEASE CFLAGS
  3. #export CFLAGS := -fmessage-length=0 -O3 -fomit-frame-pointer -pipe -march=pentium-m -msse2 -msse -mmmx
  4. export CFLAGS := -O2 -fomit-frame-pointer -pipe -march=i686
  5. export CXXFLAGS := $(CFLAGS)
  6. export LDFLAGS := -s
  7. else
  8. # DEBUG CFLAGS
  9. export CFLAGS := -g3 -fmessage-length=0 -Wall -DDEBUG -pipe
  10. export CXXFLAGS := $(CFLAGS)
  11. export LDFLAGS :=
  12. endif
  13. ifeq ($(MAKE),mingw32-make)
  14. # Windows
  15. export OS = WIN32
  16. export RM = del /F
  17. export RMSUB = del /F /s /Q
  18. export EXT = .exe
  19. export SLASH = \\
  20. export CC = gcc
  21. export CP = copy
  22. export MKDIR = mkdir
  23. else
  24. # Linux
  25. export OS = LINUX
  26. export RM = rm -f
  27. export RMSUB = rm -Rf
  28. export EXT =
  29. export SLASH = /
  30. export CP = cp
  31. export MKDIR = mkdir -p
  32. endif
  33. %.o: %.cpp
  34. @echo Compiling $@ ...
  35. @$(CXX) -c $(CXXFLAGS) -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o $@ $<
  36. %.o: %.c
  37. @echo Compiling $@ ...
  38. @$(CC) -c $(CFLAGS) -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -o $@ $<