Ticket #55: gfx2_sdl2_osx.diff
File gfx2_sdl2_osx.diff, 30.8 KB (added by , 6 years ago) |
---|
-
branches/sdl2/doc/COMPILING.txt
5 5 6 6 * gcc C compiler (other compilers may work, but are not officially supported) 7 7 * GNU make (other similar "make" tools may work, but are not supported) 8 * SDL library v 1.29 * SDL _image library8 * SDL library v2.0 9 * SDL2_image library 10 10 * libpng (not on MacOSX) 11 11 * FreeType library (optional, for truetype fonts) 12 * SDL _ttf library (optional, for truetype fonts)12 * SDL2_ttf library (optional, for truetype fonts) 13 13 * Lua library v5.1 or v5.2 (optional, for Lua scripting) 14 14 15 15 Extra requirements for Windows: … … 33 33 If all goes well, it should build grafx2 (the main program) in the "bin" 34 34 directory. Voilà. 35 35 36 If you don't have FreeType and SDL _ttf, type make NOTTF=1 instead. It will36 If you don't have FreeType and SDL2_ttf, type make NOTTF=1 instead. It will 37 37 build a version without TrueType support : the Text tool will be limited to 38 38 bitmap fonts, proportional fonts with .ttf extension won't be available. 39 39 … … 93 93 make GP2XCROSS=1 94 94 This will only work on an UNIXsystem (Linux or FreeBSD). 95 95 96 == macOS == 97 98 By default SDL2 (+image +ttf) will be searched through pkg-config, so if you use 99 homebrew, macports or similar you will be fine. If, however, you want to link 100 against its framework versions, use NOFW=0 101 102 macOS provides libpng already. However, if you want to link against a custom 103 libpng use SYSPNG=0. It will be searched through pkg-config. 104 96 105 == Windows == 97 106 98 107 It is also possible to compile from linux, with this command : … … 111 120 installed in C:\MSYS\mingw 112 121 113 122 SDL: 114 SDL -devel-1.2.13-mingw32.tar.gz123 SDL2-devel-2.0.5-mingw.tar.gz 115 124 Uncompress in temporary directory 116 125 make 117 126 make install (no effect?) 118 Headers are in /usr/mingw/include/SDL , copy them to /usr/include/SDL127 Headers are in /usr/mingw/include/SDL2, copy them to /usr/include/SDL2 119 128 120 129 Zlib: 121 130 http://gnuwin32.sourceforge.net/downlinks/zlib.php … … 148 157 make 149 158 Don't use 'make install', copy tiff.h libtiff.a manually instead. 150 159 151 SDL _image:160 SDL2_image: 152 161 Requires: Libpng 153 162 Requires optionally: libtiff 154 163 Requires optionally: libjpeg 155 http ://www.mirrorservice.org/sites/download.sourceforge.net/pub/sourceforge/l/li/libsdl/156 SDL _image-1.2.8.zip164 https://www.libsdl.org/projects/SDL_image/release/SDL2_image-devel-2.0.1-VC.zip 165 SDL2_image-devel-2.0.1-VC.zip 157 166 Uncompress in temporary directory 158 167 ./configure 159 168 Check in the messages that png worked … … 167 176 mingw-freetype-2.3.7-2 168 177 Uncompress in c:/mwsys/mingw 169 178 170 SDL _ttf:179 SDL2_ttf: 171 180 No mingw package 172 http://www.mirrorservice.org/sites/download.sourceforge.net/pub/sourceforge/l/li/libsdl/ 173 SDL_ttf-2.0.9-win32.zip for DLLs: libfreetype-6.dll, SDL_ttf.dll, zlib1.dll 174 SDL_ttf-2.0.9.tar.gz 181 https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-devel-2.0.14-VC.zip 182 SDL2_ttf-devel-2.0.14-VC.zip for DLLs: libfreetype-6.dll, SDL2_ttf.dll, zlib1.dll 175 183 176 184 Lua: 177 185 (optional) … … 182 190 (make install doesn't work, even with prefix) 183 191 Copy luaconf.h, lualib.h, lua.h, lauxlib.h to c:\msys\mingw\include 184 192 Copy liblua.a to c:\msys\mingw\lib 185 Copy lua5 1.dll to c:\msys\mingw\bin193 Copy lua52.dll to c:\msys\mingw\bin 186 194 187 195 == Atari TOS machines == 188 196 The Atari build is very similar to the Linux one. The build might work on native machine with gcc 4.3> compiler, -
branches/sdl2/src/Makefile
Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
32 32 # Compile with OPTIM=0 to disable gcc optimizations, to enable debug. 33 33 STRIP = strip 34 34 35 ### Specific to build MAC OS X universal binaries on Tiger or Lion ###36 ### (may need to be changed or removed depending on the OSX version) ###37 38 #MACOSX_LION = 139 40 ifdef MACOSX_LION41 MACOSX_SYSROOT = /Developer/SDKs/MacOSX10.6.sdk42 MACOSX_ARCH = -arch x86_64 -arch i38643 else44 MACOSX_SYSROOT = /Developer/SDKs/MacOSX10.4u.sdk45 MACOSX_ARCH = -arch ppc -arch i38646 endif47 48 35 ### PLATFORM DETECTION AND CONFIGURATION ### 49 36 50 37 PLATFORMOBJ = … … 91 78 92 79 else 93 80 ifeq ($(PLATFORM),Darwin) # 2 81 MACOSX_ARCH = -arch x86_64 -arch i386 94 82 #Mac OS X specific 95 83 DELCOMMAND = rm -rf 96 84 MKDIR = mkdir -p 97 RMDIR = rm dir --ignore-fail-on-non-empty85 RMDIR = rm -rf 98 86 # Force it 99 87 OPTIM = 3 100 88 CP = cp … … 105 93 BIN = ../bin/grafx2 106 94 SVN_REVISION = $(shell svnversion | cut -f2 -d ":" - | tr -d "M") 107 95 108 # these are for use with macports 109 #SDLCOPT = $(shell sdl2-config --cflags) 110 #SDLLOPT = $(shell sdl2-config --libs) $(shell pkg-config --libs SDL2_image) 111 #LUACOPT = $(shell pkg-config lua --cflags --silence-errors ||pkg-config lua5.1 --cflags --silence-errors ||pkg-config lua-5.1 --cflags) 112 #LUALOPT = $(shell pkg-config lua --libs --silence-errors ||pkg-config lua5.1 --libs --silence-errors ||pkg-config lua-5.1 --libs) 96 # frameworks OFF by default 97 ifndef NOFW 98 NOFW = 1 99 endif 100 ifeq ($(NOFW),0) 101 SDLCOPT = -F$(FWDIR) -D_THREAD_SAFE -DPREFIX_SDL 102 # @rpath is introduced in 10.5 Leopard 103 SDLLOPT = -framework Cocoa -framework SDL2 -framework SDL2_image -rpath @executable_path/../Frameworks 104 else 105 SDLCOPT = $(shell sdl2-config --cflags) $(shell pkg-config SDL2_image --cflags --silence-errors) 106 SDLLOPT = $(shell sdl2-config --libs) $(shell pkg-config SDL2_image --libs --silence-errors) 107 endif 113 108 114 # these are for use with Mac OS X native frameworks115 #-framework SDL_ttf116 SDLLOPT = -isysroot $(MACOSX_SYSROOT) $(MACOSX_ARCH) -L/usr/lib -framework SDL -framework SDL2_image -framework Cocoa -framework Carbon -framework OpenGL117 SDLCOPT = $(MACOSX_ARCH) -I$(FWDIR)/SDL.framework/Headers -I$(FWDIR)/SDL2_image.framework/Headers -I$(FWDIR)/SDL_ttf.framework/Headers -D_THREAD_SAFE118 LUACOPT = -I$(FWDIR)/Lua.framework/Headers119 ifdef MACOSX_LION 120 LUALOPT = -framework lua121 else 122 LUALOPT = -llua123 endif109 ifndef SYSPNG 110 SYSPNG = 1 111 endif 112 ifeq ($(SYSPNG),1) 113 PNGCOPT = 114 PNGLOPT = -lpng 115 else 116 PNGCOPT = $(shell pkg-config libpng --cflags --silence-errors) 117 PNGLOPT = $(pkg-config libpng --libs --silence-errors) 118 endif 124 119 120 # lua ON by default 121 ifndef NOLUA 122 NOLUA = 0 123 endif 124 ifeq ($(NOLUA),0) 125 LUACOPT = $(shell pkg-config lua --cflags --silence-errors) 126 LUALOPT = $(shell pkg-config lua --libs --silence-errors) 127 endif 128 129 # ttf OFF by default 130 ifndef NOTTF 131 NOTTF = 1 132 endif 133 ifeq ($(NOTTF),0) 134 ifeq ($(NOFW),0) 135 TTFCOPT = $(shell pkg-config SDL2_ttf --cflags --silence-errors) 136 TTFLOPT = $(shell pkg-config SDL2_ttf --libs --silence-errors) 137 else 138 TTFCOPT = 139 TTFLOPT = -framework SDL2_ttf 140 endif 141 endif 142 125 143 # these are for everyone 126 COPT = -D_DARWIN_C_SOURCE -D__macosx__ -D__linux__ -W -Wall -Wdeclaration-after-statement -O$(OPTIM) -std=c99 -c -g $(LUACOPT) $(SDLCOPT) $(TTFCOPT) -I/usr/include 127 ifdef MACOSX_LION 128 LOPT = $(SDLLOPT) $(LUALOPT) -framework libpng14 -lz 129 else 130 LOPT = $(SDLLOPT) $(LUALOPT) -lpng -lz 131 endif 132 # Use gcc for compiling. Use ncc to build a callgraph and analyze the code. 133 CC = gcc 134 #CC = nccgen -ncgcc -ncld -ncfabs 144 COPT = $(MACOSX_ARCH) -D_DARWIN_C_SOURCE -D__macosx__ -W -Wall -Wdeclaration-after-statement -O$(OPTIM) -std=c99 -c -g $(PNGCOPT) $(LUACOPT) $(SDLCOPT) $(TTFCOPT) -I/usr/include 145 LOPT = -F$(FWDIR) $(PNGLOPT) $(LUALOPT) $(SDLLOPT) $(TTFLOPT) 146 CC = clang 135 147 OBJDIR = ../obj/macosx 136 PLATFORMOBJ = $(OBJDIR)/SDLMain.o137 148 FCLOPT = 138 149 MACAPPEXE = Grafx2.app/Contents/MacOS/Grafx2 139 NOTTF = 1140 150 else 141 151 ifeq ($(PLATFORM),AROS) # 3 142 152 #AROS specific … … 433 443 434 444 FONT_FILES = ../share/grafx2/fonts/8pxfont.png ../share/grafx2/fonts/Tuffy.ttf ../share/grafx2/fonts/PF_Arma_5__.png ../share/grafx2/fonts/PF_Easta_7_.png ../share/grafx2/fonts/PF_Easta_7__.png ../share/grafx2/fonts/PF_Ronda_7__.png ../share/grafx2/fonts/PF_Tempesta_5.png ../share/grafx2/fonts/PF_Tempesta_5_.png ../share/grafx2/fonts/PF_Tempesta_5__.png ../share/grafx2/fonts/PF_Tempesta_5___.png ../share/grafx2/fonts/PF_Tempesta_7.png ../share/grafx2/fonts/PF_Tempesta_7_.png ../share/grafx2/fonts/PF_Tempesta_7__.png ../share/grafx2/fonts/PF_Tempesta_7___.png ../share/grafx2/fonts/PF_Westa_7_.png ../share/grafx2/fonts/PF_Westa_7__.png 435 445 436 437 446 ifeq ($(PLATFORM),Darwin) 438 447 all : $(MACAPPEXE) 439 448 $(MACAPPEXE) : $(BIN) 440 rm -rfGrafx2.app441 mkdir -pGrafx2.app Grafx2.app/Contents Grafx2.app/Contents/Frameworks Grafx2.app/Contents/MacOS Grafx2.app/Contents/Resources Grafx2.app/Contents/Resources/scripts442 mkdir -pGrafx2.app/Contents/Resources/scripts/samples_2.4443 mkdir -pGrafx2.app/Contents/Resources/scripts/samples_2.4/brush444 mkdir -pGrafx2.app/Contents/Resources/scripts/samples_2.4/demo445 mkdir -pGrafx2.app/Contents/Resources/scripts/samples_2.4/libs446 mkdir -pGrafx2.app/Contents/Resources/scripts/samples_2.4/palette447 mkdir -pGrafx2.app/Contents/Resources/scripts/samples_2.4/picture449 $(RMDIR) Grafx2.app 450 $(MKDIR) Grafx2.app Grafx2.app/Contents Grafx2.app/Contents/Frameworks Grafx2.app/Contents/MacOS Grafx2.app/Contents/Resources Grafx2.app/Contents/Resources/scripts 451 $(MKDIR) Grafx2.app/Contents/Resources/scripts/samples_2.4 452 $(MKDIR) Grafx2.app/Contents/Resources/scripts/samples_2.4/brush 453 $(MKDIR) Grafx2.app/Contents/Resources/scripts/samples_2.4/demo 454 $(MKDIR) Grafx2.app/Contents/Resources/scripts/samples_2.4/libs 455 $(MKDIR) Grafx2.app/Contents/Resources/scripts/samples_2.4/palette 456 $(MKDIR) Grafx2.app/Contents/Resources/scripts/samples_2.4/picture 448 457 echo 'APPL????' > Grafx2.app/Contents/PkgInfo 449 cp ../Info.plist Grafx2.app/Contents 450 cp -r Grafx2.icns Grafx2.app/Contents/Resources 451 cp -r English.lproj Grafx2.app/Contents/Resources 452 cp -r ../share/grafx2/fonts Grafx2.app/Contents/Resources 453 cp -r ../share/grafx2/skins Grafx2.app/Contents/Resources 454 cp -r ../share/grafx2/gfx2def.ini Grafx2.app/Contents/Resources 455 cp -r ../share/grafx2/scripts/samples_2.4/brush Grafx2.app/Contents/Resources/scripts/samples_2.4 456 cp -r ../share/grafx2/scripts/samples_2.4/demo Grafx2.app/Contents/Resources/scripts/samples_2.4 457 cp -r ../share/grafx2/scripts/samples_2.4/libs Grafx2.app/Contents/Resources/scripts/samples_2.4 458 cp -r ../share/grafx2/scripts/samples_2.4/palette Grafx2.app/Contents/Resources/scripts/samples_2.4 459 cp -r ../share/grafx2/scripts/samples_2.4/picture Grafx2.app/Contents/Resources/scripts/samples_2.4 460 ifdef MACOSX_LION 461 mkdir -p Grafx2.app/Contents/Frameworks/Lua.framework/Versions 462 mkdir -p Grafx2.app/Contents/Frameworks/libpng14.framework/Versions 463 endif 464 mkdir -p Grafx2.app/Contents/Frameworks/SDL.framework/Versions 465 mkdir -p Grafx2.app/Contents/Frameworks/SDL2_image.framework/Versions 466 # mkdir -p Grafx2.app/Contents/Frameworks/SDL_ttf.framework/Versions 467 ifdef MACOSX_LION 468 cp -Rp $(FWDIR)/Lua.framework/Versions/A Grafx2.app/Contents/Frameworks/Lua.framework/Versions 469 cp -Rp $(FWDIR)/libpng14.framework/Versions/1.4.8 Grafx2.app/Contents/Frameworks/libpng14.framework/Versions 470 endif 471 cp -Rp $(FWDIR)/SDL.framework/Versions/A Grafx2.app/Contents/Frameworks/SDL.framework/Versions 472 cp -Rp $(FWDIR)/SDL2_image.framework/Versions/A Grafx2.app/Contents/Frameworks/SDL2_image.framework/Versions 473 # cp -Rp $(FWDIR)/SDL_ttf.framework/Versions/A Grafx2.app/Contents/Frameworks/SDL_ttf.framework/Versions 474 # remove those 475 rm -fr Grafx2.app/Contents/Frameworks/SDL.framework/Versions/A/Headers 476 rm -fr Grafx2.app/Contents/Frameworks/SDL.framework/Versions/A/Resources 477 rm -fr Grafx2.app/Contents/Frameworks/SDL2_image.framework/Versions/A/Headers 478 rm -fr Grafx2.app/Contents/Frameworks/SDL2_image.framework/Versions/A/Resources 479 ifdef MACOSX_LION 480 rm -fr Grafx2.app/Contents/Frameworks/Lua.framework/Versions/A/Resources 481 rm -fr Grafx2.app/Contents/Frameworks/Lua.framework/Versions/A/Headers 482 rm -fr Grafx2.app/Contents/Frameworks/libpng14.framework/Versions/1.4.8/Resources 483 rm -fr Grafx2.app/Contents/Frameworks/libpng14.framework/Versions/1.4.8/Headers 484 rm -fr Grafx2.app/Contents/Frameworks/SDL_ttf.framework/Versions 485 endif 458 $(CP) ../Info.plist Grafx2.app/Contents 459 $(CP) -r Grafx2.icns Grafx2.app/Contents/Resources 460 $(CP) -r English.lproj Grafx2.app/Contents/Resources 461 $(CP) -r ../share/grafx2/fonts Grafx2.app/Contents/Resources 462 $(CP) -r ../share/grafx2/skins Grafx2.app/Contents/Resources 463 $(CP) -r ../share/grafx2/gfx2def.ini Grafx2.app/Contents/Resources 464 $(CP) -r ../share/grafx2/scripts/samples_2.4/brush Grafx2.app/Contents/Resources/scripts/samples_2.4 465 $(CP) -r ../share/grafx2/scripts/samples_2.4/demo Grafx2.app/Contents/Resources/scripts/samples_2.4 466 $(CP) -r ../share/grafx2/scripts/samples_2.4/libs Grafx2.app/Contents/Resources/scripts/samples_2.4 467 $(CP) -r ../share/grafx2/scripts/samples_2.4/palette Grafx2.app/Contents/Resources/scripts/samples_2.4 468 $(CP) -r ../share/grafx2/scripts/samples_2.4/picture Grafx2.app/Contents/Resources/scripts/samples_2.4 469 486 470 cp $(BIN) $(MACAPPEXE) 487 471 $(STRIP) -x -X -S $(MACAPPEXE) 488 472 chmod +x $(MACAPPEXE) 473 474 ifeq ($(NOFW),0) 475 # copy frameworks 476 $(MKDIR) Grafx2.app/Contents/Frameworks/SDL2.framework/Versions 477 $(MKDIR) Grafx2.app/Contents/Frameworks/SDL2_image.framework/Versions 478 $(MKDIR) Grafx2.app/Contents/Frameworks/SDL2_ttf.framework/Versions 479 $(CP) -Rp $(FWDIR)/SDL2.framework/Versions/A Grafx2.app/Contents/Frameworks/SDL2.framework/Versions 480 $(CP) -Rp $(FWDIR)/SDL2_image.framework/Versions/A Grafx2.app/Contents/Frameworks/SDL2_image.framework/Versions 481 $(CP) -Rp $(FWDIR)/SDL2_ttf.framework/Versions/A Grafx2.app/Contents/Frameworks/SDL2_ttf.framework/Versions 482 483 # resign SDL 484 codesign -f -s - Grafx2.app/Contents/Frameworks/SDL2.framework/Versions/A/SDL2 485 codesign -f -s - Grafx2.app/Contents/Frameworks/SDL2_image.framework/Versions/A/SDL2_image 486 ifeq ($(NOTTF),0) 487 codesign -f -s - Grafx2.app/Contents/Frameworks/SDL2_ttf.framework/Versions/A/SDL2_ttf 488 endif 489 490 # remove unneeded resources and headers 491 $(RMDIR) Grafx2.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers 492 $(RMDIR) Grafx2.app/Contents/Frameworks/SDL2.framework/Versions/A/Resources 493 $(RMDIR) Grafx2.app/Contents/Frameworks/SDL2_image.framework/Versions/A/Headers 494 $(RMDIR) Grafx2.app/Contents/Frameworks/SDL2_image.framework/Versions/A/Resources 495 $(RMDIR) Grafx2.app/Contents/Frameworks/SDL2_image.framework/Versions/A/Frameworks/webp.framework/Versions/A/Headers 496 $(RMDIR) Grafx2.app/Contents/Frameworks/SDL2_image.framework/Versions/A/Frameworks/webp.framework/Versions/A/Resources 497 $(RMDIR) Grafx2.app/Contents/Frameworks/SDL2_ttf.framework/Versions/A/Headers 498 $(RMDIR) Grafx2.app/Contents/Frameworks/SDL2_ttf.framework/Versions/A/Resources 499 $(RMDIR) Grafx2.app/Contents/Frameworks/SDL2_ttf.framework/Versions/A/Frameworks/FreeType.framework/Versions/A/Resources 500 $(RMDIR) Grafx2.app/Contents/Frameworks/SDL2_ttf.framework/Versions/A/Frameworks/FreeType.framework/Versions/A/Headers 501 else 502 # TODO copy dylibs 503 endif 504 # dist files 489 505 tar cvzf grafx2-svn$(SVN_REVISION)-macosx.tgz --exclude '*svn*' --exclude '*DS_Store*' Grafx2.app/* 490 506 else 491 507 all : $(BIN) … … 520 536 # Create a zip archive ready for upload to the website, including binaries and sourcecode 521 537 ziprelease: version $(BIN) release 522 538 echo `sed "s/.*=\"\(.*\)\";/\1/" pversion.c`.`svnversion` | tr " :" "_-" | sed -e "s/\(wip\)\\./\1/I" > $(OBJDIR)/versiontag 523 tar cvzf "../src-`cat $(OBJDIR)/versiontag`.tgz" --strip=1 ../src/*.c ../src/*.cpp ../src/*.h ../src/Makefile ../src/Makefile.dep ../src/gfx2.ico ../src/Grafx2_Prefix.pch ../src/SDLMain.m539 tar cvzf "../src-`cat $(OBJDIR)/versiontag`.tgz" --strip=1 ../src/*.c ../src/*.cpp ../src/*.h ../src/Makefile ../src/Makefile.dep ../src/gfx2.ico ../src/Grafx2_Prefix.pch 524 540 cd .. && $(ZIP) $(ZIPOPT) "grafx2-`cat $(OBJDIR:../%=%)/versiontag`$(TTFLABEL)-$(PLATFORM).$(ZIP)" $(BIN:../%=%) share/grafx2/gfx2def.ini $(SCRIPT_FILES:../%=%) $(SKIN_FILES:../%=%) share/grafx2/gfx2.gif share/icons/grafx2.svg doc/README.txt doc/COMPILING.txt doc/gpl-2.0.txt doc/PF_fonts.txt $(FONT_FILES:../%=%) doc/README-zlib1.txt doc/README-SDL.txt doc/README-SDL_image.txt doc/README-SDL_ttf.txt doc/README-lua.txt src-`cat $(OBJDIR:../%=%)/versiontag`.tgz $(PLATFORMFILES:../%=%) 525 541 $(DELCOMMAND) "../src-`cat $(OBJDIR)/versiontag`.tgz" 526 tar cvzf "../grafx2-`cat $(OBJDIR)/versiontag`$(TTFLABEL)-src.tgz" --strip=1 --transform 's,^,grafx2/,g' ../src/*.c ../src/*.cpp ../src/*.h ../src/Makefile ../src/Makefile.dep ../share/grafx2/gfx2def.ini $(SCRIPT_FILES) $(SKIN_FILES) ../src/gfx2.ico ../share/grafx2/gfx2.gif ../share/icons/grafx2.svg ../doc/README.txt ../doc/COMPILING.txt ../doc/gpl-2.0.txt ../doc/PF_fonts.txt ../misc/unix/grafx2.1 ../misc/unix/grafx2.xpm ../misc/unix/grafx2.desktop ../misc/morphos/grafx2.info $(FONT_FILES) ../src/Grafx2_Prefix.pch ../src/SDLMain.m542 tar cvzf "../grafx2-`cat $(OBJDIR)/versiontag`$(TTFLABEL)-src.tgz" --strip=1 --transform 's,^,grafx2/,g' ../src/*.c ../src/*.cpp ../src/*.h ../src/Makefile ../src/Makefile.dep ../share/grafx2/gfx2def.ini $(SCRIPT_FILES) $(SKIN_FILES) ../src/gfx2.ico ../share/grafx2/gfx2.gif ../share/icons/grafx2.svg ../doc/README.txt ../doc/COMPILING.txt ../doc/gpl-2.0.txt ../doc/PF_fonts.txt ../misc/unix/grafx2.1 ../misc/unix/grafx2.xpm ../misc/unix/grafx2.desktop ../misc/morphos/grafx2.info $(FONT_FILES) ../src/Grafx2_Prefix.pch 527 543 $(DELCOMMAND) "$(OBJDIR)/versiontag" 528 544 529 545 $(BIN) : $(OBJ) 530 546 test -d ../bin || $(MKDIR) ../bin 531 $(CC) $( OBJ) -o $(BIN) $(LOPT) $(LFLAGS)547 $(CC) $(LOPT) $(LFLAGS) -o $(BIN) $(OBJ) 532 548 533 549 # SVN revision number 534 550 version.c : … … 572 588 clean : 573 589 $(DELCOMMAND) $(OBJ) 574 590 $(DELCOMMAND) $(BIN) 591 ifeq ($(PLATFORM),Darwin) 592 $(DELCOMMAND) Grafx2.app 593 endif 575 594 576 595 ifneq ($(PLATFORM),amiga-vbcc) 577 596 # Linux installation of the program -
branches/sdl2/src/SFont.c
25 25 GERMANY 26 26 karlb@gmx.net 27 27 */ 28 #if defined(PREFIX_SDL) 28 29 #include <SDL2/SDL.h> 30 #include <SDL2/SDL_video.h> 31 #else 32 #include <SDL.h> 29 33 #include <SDL_video.h> 34 #endif 30 35 31 36 #include <assert.h> 32 37 #include <stdlib.h> -
branches/sdl2/src/SFont.h
44 44 #ifndef _SFONT_H_ 45 45 #define _SFONT_H_ 46 46 47 #if defined(PREFIX_SDL) 47 48 #include <SDL2/SDL.h> 49 #else 50 #include <SDL.h> 51 #endif 48 52 49 53 #ifdef __cplusplus 50 54 extern "C" { -
branches/sdl2/src/buttons.c
46 46 #include <unistd.h> 47 47 #include <ctype.h> 48 48 #include <sys/stat.h> 49 50 #if defined(PREFIX_SDL) 49 51 #include <SDL2/SDL.h> 52 #else 53 #include <SDL.h> 54 #endif 50 55 51 56 #include "const.h" 52 57 #include "struct.h" -
branches/sdl2/src/buttons_effects.c
25 25 /// Handles all the effects buttons and setup windows in the effects menu. 26 26 //////////////////////////////////////////////////////////////////////////// 27 27 28 #if defined(PREFIX_SDL) 29 #include <SDL2/SDL.h> 30 #else 28 31 #include <SDL.h> 32 #endif 33 29 34 #include <stdlib.h> 30 35 #include <string.h> 31 36 -
branches/sdl2/src/filesel.c
24 24 along with Grafx2; if not, see <http://www.gnu.org/licenses/> 25 25 */ 26 26 27 #include <SDL_syswm.h> 27 // There is no WM on the GP2X... 28 #if !defined(__GP2X__) && !defined(__WIZ__) && !defined(__CAANOO__) 29 #if defined(PREFIX_SDL) 30 #include <SDL2/SDL_syswm.h> 31 #else 32 #include <SDL_syswm.h> 33 #endif 34 #endif 28 35 29 36 #if defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__) || defined(__amigaos__) 30 37 #include <proto/dos.h> -
branches/sdl2/src/global.h
30 30 #ifndef _GLOBAL_H_ 31 31 #define _GLOBAL_H_ 32 32 33 #if defined(PREFIX_SDL) 33 34 #include <SDL2/SDL.h> 35 #else 36 #include <SDL.h> 37 #endif 38 34 39 #include "struct.h" 35 40 36 41 // MAIN declares the variables, -
branches/sdl2/src/hotkeys.h
31 31 #else 32 32 #define bool char 33 33 #endif 34 35 #if defined(PREFIX_SDL) 34 36 #include <SDL2/SDL.h> 37 #else 38 #include <SDL.h> 39 #endif 35 40 36 41 #define NB_SHORTCUTS 209 ///< Number of actions that can have a key combination associated to it. 37 42 -
branches/sdl2/src/init.c
44 44 45 45 #include <stdlib.h> 46 46 #include <errno.h> 47 48 #if defined(PREFIX_SDL) 47 49 #include <SDL2/SDL.h> 50 #include <SDL2_image/SDL_image.h> 51 #else 52 #include <SDL.h> 48 53 #include <SDL_image.h> 54 #endif 55 49 56 #if defined(__WIN32__) 50 57 #include <windows.h> // GetLogicalDrives(), GetDriveType(), DRIVE_* 51 58 #endif -
branches/sdl2/src/input.c
21 21 */ 22 22 23 23 #include <stdlib.h> 24 25 #if defined(PREFIX_SDL) 24 26 #include <SDL2/SDL.h> 25 #include <SDL_syswm.h> 27 #else 28 #include <SDL.h> 29 #endif 26 30 31 // There is no WM on the GP2X... 32 #if !defined(__GP2X__) && !defined(__WIZ__) && !defined(__CAANOO__) 33 #if defined(PREFIX_SDL) 34 #include <SDL2/SDL_syswm.h> 35 #else 36 #include <SDL_syswm.h> 37 #endif 38 #endif 39 27 40 #include "global.h" 28 41 #include "keyboard.h" 29 42 #include "sdlscreen.h" -
branches/sdl2/src/io.c
24 24 // Fonctions de lecture/ecriture file, gèrent les systèmes big-endian et 25 25 // little-endian. 26 26 27 #if defined(PREFIX_SDL) 28 #include <SDL2/SDL_endian.h> 29 #else 27 30 #include <SDL_endian.h> 31 #endif 28 32 #include <string.h> 29 33 #include <sys/stat.h> 30 34 #include <errno.h> -
branches/sdl2/src/loadsave.c
31 31 #include <string.h> 32 32 #include <unistd.h> 33 33 #include <limits.h> 34 35 #if defined(PREFIX_SDL) 36 #include <SDL2/SDL_endian.h> 37 #include <SDL2_image/SDL_image.h> 38 #else 39 #include <SDL_endian.h> 34 40 #include <SDL_image.h> 35 # include <SDL_endian.h>41 #endif 36 42 37 43 #include "buttons.h" 38 44 #include "const.h" -
branches/sdl2/src/loadsave.h
28 28 #define __LOADSAVE_H__ 29 29 30 30 #include <stdio.h> 31 32 #if defined(PREFIX_SDL) 33 #include <SDL2_image/SDL_image.h> 34 #else 31 35 #include <SDL_image.h> 36 #endif 32 37 33 38 enum CONTEXT_TYPE { 34 39 CONTEXT_MAIN_IMAGE, -
branches/sdl2/src/main.c
36 36 #include <string.h> 37 37 #include <signal.h> 38 38 #include <unistd.h> 39 #if defined(PREFIX_SDL) 39 40 #include <SDL2/SDL.h> 41 #include <SDL2_image/SDL_image.h> 42 #else 43 #include <SDL.h> 40 44 #include <SDL_image.h> 45 #endif 41 46 42 43 47 // There is no WM on the GP2X... 44 48 #if !defined(__GP2X__) && !defined(__WIZ__) && !defined(__CAANOO__) 45 #include <SDL_syswm.h> 49 #if defined(PREFIX_SDL) 50 #include <SDL2/SDL_syswm.h> 51 #else 52 #include <SDL_syswm.h> 53 #endif 46 54 #endif 47 55 48 56 #include "const.h" -
branches/sdl2/src/misc.c
21 21 You should have received a copy of the GNU General Public License 22 22 along with Grafx2; if not, see <http://www.gnu.org/licenses/> 23 23 */ 24 #if defined(PREFIX_SDL) 24 25 #include <SDL2/SDL.h> 26 #else 27 #include <SDL.h> 28 #endif 29 25 30 #include <string.h> 26 31 #include <strings.h> 27 32 #include <stdlib.h> -
branches/sdl2/src/oldies.c
20 20 You should have received a copy of the GNU General Public License 21 21 along with Grafx2; if not, see <http://www.gnu.org/licenses/> 22 22 */ 23 #if defined(PREFIX_SDL) 24 #include <SDL2/SDL.h> 25 #else 23 26 #include <SDL.h> 27 #endif 28 24 29 #include <string.h> 25 30 #include <strings.h> 26 31 #include <stdlib.h> -
branches/sdl2/src/pxsimple.c
23 23 24 24 #include <string.h> 25 25 #include <stdlib.h> 26 27 #if defined(PREFIX_SDL) 28 #include <SDL2/SDL.h> 29 #else 26 30 #include <SDL.h> 31 #endif 32 27 33 #include "global.h" 28 34 #include "sdlscreen.h" 29 35 #include "misc.h" -
branches/sdl2/src/readini.c
841 841 conf->Skin_file = strdup(value_label); 842 842 } 843 843 else 844 conf->Skin_file = strdup("skin_ DPaint.png");844 conf->Skin_file = strdup("skin_modern.png"); 845 845 846 846 // Optional, name of font file. (>2.0) 847 847 if(!Load_INI_get_string(file,buffer,"Font_file",value_label,1)) 848 848 conf->Font_file = strdup(value_label); 849 849 else 850 conf->Font_file = strdup("font_ Dpaint.png");850 conf->Font_file = strdup("font_Classic.png"); 851 851 852 852 // Optional, "fake hardware zoom" factor (>2.1) 853 853 if (!Load_INI_get_values (file, buffer,"Pixel_ratio",1,values)) -
branches/sdl2/src/realpath.c
6 6 #include <fcntl.h> 7 7 #include <string.h> 8 8 #include <unistd.h> 9 #if defined(__AROS__) || defined(__linux__) || defined(__GLIBC__)|| defined(__MINT__) || defined(__FreeBSD__) 9 #if defined(__AROS__) || defined(__linux__) || defined(__GLIBC__)|| defined(__MINT__) || defined(__FreeBSD__) || defined(__macosx__) 10 10 #include <limits.h> 11 11 #endif 12 12 -
branches/sdl2/src/sdlscreen.c
25 25 #include <string.h> 26 26 #include <stdlib.h> 27 27 #include <stdio.h> 28 29 #if defined(PREFIX_SDL) 28 30 #include <SDL2/SDL.h> 31 #include <SDL2/SDL_endian.h> 32 #include <SDL2_image/SDL_image.h> 33 #else 34 #include <SDL.h> 35 #include <SDL_endian.h> 29 36 #include <SDL_image.h> 30 #include <SDL_endian.h> 31 #include <SDL2/SDL_syswm.h> 37 #endif 38 39 // There is no WM on the GP2X... 40 #if !defined(__GP2X__) && !defined(__WIZ__) && !defined(__CAANOO__) 41 #if defined(PREFIX_SDL) 42 #include <SDL2/SDL_syswm.h> 43 #else 44 #include <SDL_syswm.h> 45 #endif 46 #endif 47 32 48 #if defined(__WIN32__) 33 49 #include <windows.h> 34 50 #endif -
branches/sdl2/src/sdlscreen.h
28 28 #ifndef SDLSCREEN_H_INCLUDED 29 29 #define SDLSCREEN_H_INCLUDED 30 30 31 #if defined(PREFIX_SDL) 31 32 #include <SDL2/SDL.h> 33 #else 34 #include <SDL.h> 35 #endif 36 32 37 #include "struct.h" 33 38 34 39 /// -
branches/sdl2/src/setup.h
139 139 #if defined (__MINT__) 140 140 #define DEFAULT_SKIN_FILENAME "SDPAINT.PNG" 141 141 #else 142 #define DEFAULT_SKIN_FILENAME "skin_ DPaint.png"142 #define DEFAULT_SKIN_FILENAME "skin_modern.png" 143 143 #endif 144 144 145 145 /// Name of the image file for the default (and fallback) 8x8 font. … … 146 146 #if defined (__MINT__) 147 147 #define DEFAULT_FONT_FILENAME "FDPAINT.PNG" 148 148 #else 149 #define DEFAULT_FONT_FILENAME "font_D Paint.png"149 #define DEFAULT_FONT_FILENAME "font_Dpaint.png" 150 150 #endif 151 151 152 152 /// File extension for safety backups -
branches/sdl2/src/struct.h
29 29 #ifndef _STRUCT_H_ 30 30 #define _STRUCT_H_ 31 31 32 #if defined(PREFIX_SDL) 33 #include <SDL2/SDL.h> 34 #else 32 35 #include <SDL.h> 36 #endif 33 37 34 38 #if defined(__BEOS__) || defined(__TRU64__) 35 39 #include <inttypes.h> -
branches/sdl2/src/text.c
32 32 33 33 // TrueType 34 34 #ifndef NOTTF 35 #if defined( __macosx__)36 #include <SDL_ttf/SDL_ttf.h>35 #if defined(PREFIX_SDL) 36 #include <SDL2_ttf/SDL_ttf.h> 37 37 #else 38 #include <SDL2/SDL_ttf.h>38 #include <SDL_ttf.h> 39 39 #endif 40 40 41 41 #if defined(__CAANOO__) || defined(__WIZ__) || defined(__GP2X__) … … 50 50 #import <sys/param.h> 51 51 #endif 52 52 53 #if defined(PREFIX_SDL) 54 #include <SDL2_image/SDL_image.h> 55 #else 53 56 #include <SDL_image.h> 57 #endif 58 54 59 #include "SFont.h" 55 60 56 61 #include "struct.h" … … 316 321 number = 3; 317 322 // Make sure we also search into the user's fonts directory 318 323 CFURLRef url = (CFURLRef) CFCopyHomeDirectoryURLForUser(NULL); 319 CFURLGetFileSystemRepresentation(url, true, (UInt8 *) 324 CFURLGetFileSystemRepresentation(url, true, (UInt8 *)&home_dir, MAXPATHLEN); 320 325 strcat(home_dir, "/Library/Fonts"); 321 326 font_path_list[2] = home_dir; 322 327 -
branches/sdl2/src/windows.h
28 28 #define __WINDOWS_H_ 29 29 30 30 #include "struct.h" 31 32 #if defined(PREFIX_SDL) 33 #include <SDL2/SDL.h> 34 #else 31 35 #include <SDL.h> 36 #endif 32 37 33 38 34 39 #ifdef MULTI_WINDOW