New makefile including os4 build. Thanks xeron ! :)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@303 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
468af075c3
commit
a327f92805
46
Makefile
46
Makefile
@ -30,24 +30,40 @@ ifdef COMSPEC
|
||||
CC = gcc
|
||||
OBJDIR = obj/win32
|
||||
else
|
||||
# Linux specific
|
||||
DELCOMMAND = rm -rf
|
||||
MKDIR = mkdir -p
|
||||
ifdef WIN32CROSS
|
||||
#cross compile a Win32 executable
|
||||
CC = i586-mingw32msvc-gcc
|
||||
BIN = grafx2.exe
|
||||
CFGBIN = gfxcfg.exe
|
||||
COPT = -W -Wall -O -g -ggdb -Dmain=SDL_main `/usr/local/cross-tools/i386-mingw32/bin/sdl-config --cflags`
|
||||
LOPT = -mwindows -lmingw32 -lSDLmain -lSDL -lshlwapi `/usr/local/cross-tools/i386-mingw32/bin/sdl-config --libs`
|
||||
OBJDIR = obj/win32
|
||||
else
|
||||
|
||||
PLATFORM = $(shell uname)
|
||||
|
||||
#OS4 specific
|
||||
ifeq ($(PLATFORM),AmigaOS)
|
||||
DELCOMMAND = rm -rf
|
||||
MKDIR = mkdir -p
|
||||
BIN = grafx2
|
||||
CFGBIN = gfxcfg
|
||||
COPT = -W -Wall -c -g `sdl-config --cflags`
|
||||
LOPT = `sdl-config --libs`
|
||||
COPT = -Wall -c -gstabs -mcrt=newlib `sdl-config --cflags`
|
||||
LOPT = `sdl-config --libs` -lpng -ljpeg -lz
|
||||
CC = gcc
|
||||
OBJDIR = obj/unix
|
||||
OBJDIR = obj/amiga
|
||||
else
|
||||
|
||||
# Linux specific
|
||||
DELCOMMAND = rm -rf
|
||||
MKDIR = mkdir -p
|
||||
ifdef WIN32CROSS
|
||||
#cross compile a Win32 executable
|
||||
CC = i586-mingw32msvc-gcc
|
||||
BIN = grafx2.exe
|
||||
CFGBIN = gfxcfg.exe
|
||||
COPT = -W -Wall -O -g -ggdb -Dmain=SDL_main `/usr/local/cross-tools/i386-mingw32/bin/sdl-config --cflags`
|
||||
LOPT = -mwindows -lmingw32 -lSDLmain -lSDL -lshlwapi `/usr/local/cross-tools/i386-mingw32/bin/sdl-config --libs`
|
||||
OBJDIR = obj/win32
|
||||
else
|
||||
BIN = grafx2
|
||||
CFGBIN = gfxcfg
|
||||
COPT = -W -Wall -c -g `sdl-config --cflags`
|
||||
LOPT = `sdl-config --libs`
|
||||
CC = gcc
|
||||
OBJDIR = obj/unix
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
66
Makefile.os4
66
Makefile.os4
@ -1,66 +0,0 @@
|
||||
# Grafx2 - The Ultimate 256-color bitmap paint program
|
||||
#
|
||||
# Copyright 2007 Adrien Destugues
|
||||
# Copyright 1996-2001 Sunset Design (Guillaume Dorme & Karl Maritaud)
|
||||
#
|
||||
# Grafx2 is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; version 2
|
||||
# of the License.
|
||||
#
|
||||
# Grafx2 is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Grafx2; if not, see <http://www.gnu.org/licenses/> or
|
||||
# write to the Free Software Foundation, Inc.,
|
||||
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
# Aaaameeeegaaaaa
|
||||
DELCOMMAND = rm -rf
|
||||
BIN = grafx2
|
||||
CFGBIN = gfxcfg
|
||||
COPT = -Wall -c -gstabs -mcrt=newlib `sdl-config --cflags`
|
||||
LOPT = `sdl-config --libs`
|
||||
CC = gcc
|
||||
|
||||
.PHONY : all debug release clean depend zip
|
||||
|
||||
OBJ = main.o init.o graph.o sdlscreen.o divers.o special.o boutons.o palette.o aide.o operatio.o pages.o loadsave.o readline.o moteur.o files.o op_c.o linux.o op_asm.o readini.o saveini.o shade.o clavier.o io.o
|
||||
CFGOBJ = gfxcfg.o SFont.o clavier.o io.o
|
||||
|
||||
OBJDIR = obj/
|
||||
|
||||
all : $(BIN) $(CFGBIN)
|
||||
|
||||
debug : $(BIN)
|
||||
|
||||
release : $(BIN) $(CFGBIN)
|
||||
strip $(BIN)
|
||||
strip $(CFGBIN)
|
||||
|
||||
# A release zip archive
|
||||
ziprelease:
|
||||
tar cvzf src-svn`svnversion`.tgz *.c *.h Makefile Makefile.dep
|
||||
zip grafx2-beta-svn`svnversion`-win32.zip $(BIN) $(CFGBIN) gfx2.dat gfx2.ico doc/gpl-2.0.txt SDL.dll 8pxfont.png SDL_image.dll
|
||||
|
||||
$(BIN) : $(OBJ)
|
||||
$(CC) $(OBJ) -o $(BIN) $(LOPT)
|
||||
|
||||
$(CFGBIN) : $(CFGOBJ)
|
||||
$(CC) $(CFGOBJ) -o $(CFGBIN) $(LOPT) -lSDL_image -lz -lpng -ljpeg
|
||||
|
||||
%.o :
|
||||
$(CC) $(COPT) -c $*.c -o $*.o
|
||||
|
||||
depend :
|
||||
$(CC) -MM $(OBJ:.o=.c) $(CFGOBJ:.o=.c) > Makefile.dep
|
||||
|
||||
clean :
|
||||
$(DELCOMMAND) *.o
|
||||
$(DELCOMMAND) $(BIN)
|
||||
$(DELCOMMAND) $(CFGBIN)
|
||||
|
||||
include Makefile.dep
|
||||
Loading…
x
Reference in New Issue
Block a user