archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / flobopuyo / trunk / flobopuyo-0.20-libs.patch
blobb6cca53cb8667f350474d6c01cc7f6396b38225a
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
3 @@ -41,15 +41,13 @@
4 ##############
6 SDL_CONFIG=sdl-config
7 -CC=g++
8 -CXX=g++
10 -CFLAGS= -DDATADIR=\"${DATADIR}\"
11 -LDFLAGS=
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
18 +LDFLAGS:=$(LDFLAGS)
19 +LIBS:=$(LIBS) `$(SDL_CONFIG) --cflags --libs`
20 endif
22 HFILES= HiScores.h IosException.h IosImgProcess.h IosVector.h PuyoCommander.h\
23 @@ -71,46 +69,46 @@
24 ################
25 # Mac OS X
26 ifeq ($(PLATFORM), Darwin)
27 -CFLAGS:=$(CFLAGS) -DMACOSX -UDATADIR
28 +CXXFLAGS:=$(CXXFLAGS) -DMACOSX -UDATADIR
29 endif
31 ################
32 # Win32
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
39 endif
41 ifeq ($(ENABLE_AUDIO), true)
42 -CFLAGS:=$(CFLAGS) -DUSE_AUDIO=1
43 +CXXFLAGS:=$(CXXFLAGS) -DUSE_AUDIO=1
44 OBJFILES:=$(OBJFILES)
45 endif
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
53 +LDFLAGS:=$(LDFLAGS)
54 +LIBS:=$(LIBS) -lGL
55 endif
56 endif
58 ifeq ($(ENABLE_DGA), true)
59 ifeq ($(PLATFORM), Linux)
60 -CFLAGS:=$(CFLAGS) -DUSE_DGA=1
61 +CXXFLAGS:=$(CXXFLAGS) -DUSE_DGA=1
62 endif
63 endif
65 ifeq ($(DEBUG), true)
66 -CFLAGS:=$(CFLAGS) -DDEBUG=1 -g
67 +CXXFLAGS:=$(CXXFLAGS) -DDEBUG=1 -g
68 LDFLAGS:=$(LDFLAGS) -g
69 endif
71 -CXXFLAGS=${CFLAGS}
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
81 @@ -121,14 +119,14 @@
82 prelude:
83 @rm -f WARNINGS
84 @touch WARNINGS
85 - @echo "Compiling with CFLAGS=$(CFLAGS)"
86 + @echo "Compiling with CXXFLAGS=$(CXXFLAGS)"
87 @echo "Compiling with LDFLAGS=$(LDFLAGS)"
89 %.o:%.c
90 - @echo "[$@]" && $(CC) $(CFLAGS) -c $< 2>> WARNINGS || (cat WARNINGS && false)
91 + @echo "[$@]" && $(CXX) $(CXXFLAGS) -c $<
93 %.o:%.cpp
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
99 @@ -155,10 +153,10 @@
100 IosException.o:IosException.cpp
101 IosVector.o:IosVector.cpp
102 glSDL.o:glSDL.c
103 - @echo "[$@]" && $(CC) $(CFLAGS) -c $< 2>> EXT_WARNINGS
104 + @echo "[$@]" && $(CXX) $(CXXFLAGS) -c $<
105 @rm -f EXT_WARNINGS
106 SDL_prim.o:SDL_prim.c
107 - @echo "[$@]" && $(CC) $(CFLAGS) -c $< 2>> EXT_WARNINGS
108 + @echo "[$@]" && $(CXX) $(CXXFLAGS) -c $<
109 @rm -f EXT_WARNINGS
110 corona.o:corona.cpp
111 corona32.o:corona32.cpp
112 @@ -178,7 +176,6 @@
113 rm -f .DS_Store */.DS_Store */*/.DS_Store .gdb_history
115 install: flobopuyo
116 - strip flobopuyo
117 mkdir -p ${INSTALL_BINDIR}
118 mkdir -p ${INSTALL_DATADIR}
119 cp -r data/* ${INSTALL_DATADIR}
120 @@ -191,7 +188,7 @@
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"
129 @@ -207,7 +204,6 @@
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
135 mac-package: bundle
136 mkdir -p $(macimage_name)