]> Shamusworld >> Repos - stargem2/blobdiff - Makefile
Finally fixed problems with demo mode.
[stargem2] / Makefile
old mode 100755 (executable)
new mode 100644 (file)
index 52955a6..0f029a2
--- a/Makefile
+++ b/Makefile
@@ -3,25 +3,24 @@
 #
 # by James L. Hammons
 # (C) 2005 Underground Software
-# This software is licensed under the GPL v2
+# This software is licensed under the GPL v3 or later
 #
 
+FIND = find
+
 ifeq "$(OSTYPE)" "msys"                                                        # Win32
 
 SYSTYPE    = __GCCWIN32__
 EXESUFFIX  = .exe
-GLLIB      = -lopengl32
 ICON       = obj/icon.o
 SDLLIBTYPE = --libs
 MSG        = Win32 on MinGW
 
 else
-#ifeq "$(OSTYPE)" "darwin"
 ifeq "darwin" "$(findstring darwin,$(OSTYPE))" # Should catch both 'darwin' and 'darwin7.0'
 
 SYSTYPE    = __GCCUNIX__ -D_OSX_
 EXESUFFIX  =
-GLLIB      =
 ICON       =
 SDLLIBTYPE = --static-libs
 MSG        = Mac OS X
@@ -30,7 +29,6 @@ else                                                                                  # *nix
 
 SYSTYPE    = __GCCUNIX__
 EXESUFFIX  =
-GLLIB      = -lGL
 ICON       =
 SDLLIBTYPE = --libs
 MSG        = generic Unix/Linux
@@ -42,15 +40,15 @@ CC         = gcc
 LD         = gcc
 TARGET     = stargem2
 
-CFLAGS   = -MMD -Wall -Wno-switch -Wno-uninitialized -O2 -D$(SYSTYPE) -fomit-frame-pointer `sdl-config --cflags`
-CPPFLAGS = -MMD -Wall -Wno-switch -Wno-non-virtual-dtor -Wno-uninitialized -O2 -D$(SYSTYPE) \
-               -fomit-frame-pointer `sdl-config --cflags` \
+CFLAGS   = -MMD -Wall -Wno-switch -Wno-uninitialized -Wno-unused -O2 -D$(SYSTYPE) -fomit-frame-pointer `sdl2-config --cflags`
+CPPFLAGS = -MMD -Wall -Wno-switch -Wno-non-virtual-dtor -Wno-uninitialized -Wno-unused -O2 -D$(SYSTYPE) \
+               -fomit-frame-pointer `sdl2-config --cflags` \
                -g
 #              -DLOG_UNMAPPED_MEMORY_ACCESSES
 
 LDFLAGS =
 
-LIBS = -L/usr/local/lib `sdl-config $(SDLLIBTYPE)` -lstdc++ -lz $(GLLIB)
+LIBS = -L/usr/local/lib `sdl2-config $(SDLLIBTYPE)` -lstdc++ -lz
 
 INCS = -I. -Isrc -I/usr/local/include
 
@@ -60,11 +58,11 @@ OBJS = \
        obj/log.o           \
        obj/v6808.o         \
        obj/v6809.o         \
+       obj/v6821.o         \
        obj/video.o         \
        obj/settings.o      \
        obj/sound.o         \
        obj/sdlemu_config.o \
-       obj/sdlemu_opengl.o \
        obj/timing.o        \
        obj/stargem2.o      \
        $(ICON)
@@ -127,6 +125,12 @@ $(TARGET)$(EXESUFFIX): $(OBJS)
 #      strip --strip-all $(TARGET)$(EXESUFFIX)
 #      upx -9 $(TARGET)$(EXESUFFIX)
 
+statistics:
+       @echo -n "Lines in source files: "
+       @-$(FIND) ./src -name "*.cpp" | xargs cat | wc -l
+       @echo -n "Lines in header files: "
+       @-$(FIND) ./src -name "*.h" | xargs cat | wc -l
+
 # Pull in dependencies autogenerated by gcc's -MMD switch
 # The "-" in front in there just in case they haven't been created yet