1 --- flobopuyo-0.20/Makefile.orig 2004-10-08 18:41:12.000000000 -0400
2 +++ flobopuyo-0.20/Makefile 2008-08-06 19:48:47.000000000 -0400
10 -CFLAGS= -DDATADIR=\"${DATADIR}\"
12 +CXXFLAGS+= -DDATADIR=\"${DATADIR}\"
14 ifneq ($(PLATFORM), $(CYGWIN_VERSION))
15 -CFLAGS:=$(CFLAGS) `$(SDL_CONFIG) --cflags` -I/sw/include
16 -LDFLAGS:=$(LDFLAGS) `$(SDL_CONFIG) --cflags --libs`
17 +CXXFLAGS:=$(CXXFLAGS) `$(SDL_CONFIG) --cflags` -I/usr/include
19 +LIBS:=$(LIBS) `$(SDL_CONFIG) --cflags --libs`
22 HFILES= HiScores.h IosException.h IosImgProcess.h IosVector.h PuyoCommander.h\
26 ifeq ($(PLATFORM), Darwin)
27 -CFLAGS:=$(CFLAGS) -DMACOSX -UDATADIR
28 +CXXFLAGS:=$(CXXFLAGS) -DMACOSX -UDATADIR
33 ifeq ($(PLATFORM), $(CYGWIN_VERSION))
34 -CFLAGS:=$(CFLAGS) -mno-cygwin -mwindows -DWIN32 -DYY_NEVER_INTERACTIVE=1 -I$(WINSDLINCLUDE)
35 -LDFLAGS:=$(LDFLAGS) -L$(WINSDLDEVLIBS) -lmingw32 -ljpeg -lzlib -lpng1 -lSDL_image -lSDL_mixer -lSDL -lSDLmain
36 +CXXFLAGS:=$(CXXFLAGS) -mno-cygwin -mwindows -DWIN32 -DYY_NEVER_INTERACTIVE=1 -I$(WINSDLINCLUDE)
37 +LDFLAGS:=$(LDFLAGS) -L$(WINSDLDEVLIBS)
38 +LIBS:=$(LIBS) -lmingw32 -ljpeg -lzlib -lpng1 -lSDL_image -lSDL_mixer -lSDL -lSDLmain
41 ifeq ($(ENABLE_AUDIO), true)
42 -CFLAGS:=$(CFLAGS) -DUSE_AUDIO=1
43 +CXXFLAGS:=$(CXXFLAGS) -DUSE_AUDIO=1
47 ifeq ($(ENABLE_OPENGL), true)
48 -CFLAGS:=$(CFLAGS) -DHAVE_OPENGL=1
49 +CXXFLAGS:=$(CXXFLAGS) -DHAVE_OPENGL=1
50 OBJFILES:=$(OBJFILES) glSDL.o
51 ifeq ($(PLATFORM), Linux)
52 -LDFLAGS:=$(LDFLAGS) -lGL
58 ifeq ($(ENABLE_DGA), true)
59 ifeq ($(PLATFORM), Linux)
60 -CFLAGS:=$(CFLAGS) -DUSE_DGA=1
61 +CXXFLAGS:=$(CXXFLAGS) -DUSE_DGA=1
66 -CFLAGS:=$(CFLAGS) -DDEBUG=1 -g
67 +CXXFLAGS:=$(CXXFLAGS) -DDEBUG=1 -g
68 LDFLAGS:=$(LDFLAGS) -g
73 all: prelude flobopuyo
75 flobopuyo: ${OBJFILES}
76 - @echo "[flobopuyo]" && g++ $(CFLAGS) $(LDFLAGS) -o flobopuyo -lSDL_mixer -lSDL_image ${OBJFILES}
77 + @echo "[flobopuyo]" && $(CXX) $(LDFLAGS) $(OBJFILES) -o flobopuyo $(LIBS) -lSDL_mixer -lSDL_image
78 @echo "--------------------------------------"
79 @echo " Compilation finished"
80 @[ "x`cat WARNINGS | wc -l`" != "x0" ] && echo -e "--------------------------------------\n There have been some warnings:\n" && cat WARNINGS && rm -f WARNINGS && echo "--------------------------------------" || true
85 - @echo "Compiling with CFLAGS=$(CFLAGS)"
86 + @echo "Compiling with CXXFLAGS=$(CXXFLAGS)"
87 @echo "Compiling with LDFLAGS=$(LDFLAGS)"
90 - @echo "[$@]" && $(CC) $(CFLAGS) -c $< 2>> WARNINGS || (cat WARNINGS && false)
91 + @echo "[$@]" && $(CXX) $(CXXFLAGS) -c $<
94 - @echo "[$@]" && $(CXX) $(CFLAGS) -c $< 2>> WARNINGS || (cat WARNINGS && false)
95 + @echo "[$@]" && $(CXX) $(CXXFLAGS) -c $<
97 PuyoDoomMelt.o:PuyoDoomMelt.c ${HFILES}
98 HiScores.o:HiScores.cpp HiScores.h preferences.h
100 IosException.o:IosException.cpp
101 IosVector.o:IosVector.cpp
103 - @echo "[$@]" && $(CC) $(CFLAGS) -c $< 2>> EXT_WARNINGS
104 + @echo "[$@]" && $(CXX) $(CXXFLAGS) -c $<
106 SDL_prim.o:SDL_prim.c
107 - @echo "[$@]" && $(CC) $(CFLAGS) -c $< 2>> EXT_WARNINGS
108 + @echo "[$@]" && $(CXX) $(CXXFLAGS) -c $<
111 corona32.o:corona32.cpp
113 rm -f .DS_Store */.DS_Store */*/.DS_Store .gdb_history
117 mkdir -p ${INSTALL_BINDIR}
118 mkdir -p ${INSTALL_DATADIR}
119 cp -r data/* ${INSTALL_DATADIR}
121 chmod a+rx ${INSTALL_BINDIR}/flobopuyo
123 flobopuyo-static: prelude ${OBJFILES}
124 - @echo "[flobopuyo-static]" && g++ $(CFLAGS) -o flobopuyo-static ${OBJFILES}\
125 + @echo "[flobopuyo-static]" && g++ $(CXXFLAGS) -o flobopuyo-static ${OBJFILES}\
126 /sw/lib/libSDL_mixer.a /sw/lib/libvorbisfile.a /sw/lib/libvorbis.a /sw/lib/libogg.a /sw/lib/libsmpeg.a /sw/lib/libSDL_image.a /sw/lib/libjpeg.a /sw/lib/libpng.a -lz `$(SDL_CONFIG) --static-libs`
127 @echo "--------------------------------------"
128 @echo " Compilation finished"
130 rm -rf $(bundle_name)/Contents/Resources/data/CVS $(bundle_name)/Contents/Resources/data/*/CVS
131 rm -rf $(bundle_name)/Contents/Resources/data/.xvpics $(bundle_name)/Contents/Resources/data/*/.xvpics
132 rm -f $(bundle_name)/Contents/Resources/data/.DS_Store $(bundle_name)/Contents/Resources/data/*/.DS_Store
133 - strip $(bundle_name)/Contents/MacOS/flobopuyo
136 mkdir -p $(macimage_name)