Some fixes to make the amiga build work better. I finally installed gcc on my amiga, so there is a
hope of getting a working build. Everything compiles but fails when linking, because I've not figured out how to install SDL. git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1464 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
f06dbc1389
commit
f36f4c9ddb
44
src/Makefile
44
src/Makefile
@ -59,19 +59,20 @@ else
|
||||
#For all other platforms, we can rely on uname
|
||||
PLATFORM = $(shell uname)
|
||||
|
||||
#AmigaOS4 specific
|
||||
#AmigaOS (3 or 4) specific
|
||||
ifeq ($(PLATFORM),AmigaOS) # 1
|
||||
DELCOMMAND = rm -rf
|
||||
MKDIR = mkdir -p
|
||||
RMDIR = rmdir
|
||||
CP = cp
|
||||
BIN = ../bin/grafx2
|
||||
COPT = -Wall -c -gstabs -mcrt=newlib `sdl-config --cflags` -I/SDK/Local/common/include/SDL -D__USE_INLINE__ $(TTFCOPT)
|
||||
COPT = -Wall -c -gstabs `sdl-config --cflags` $(TTFCOPT)
|
||||
LOPT = `sdl-config --libs` -lSDL_image -lpng -ljpeg -lz $(TTFLOPT) -lft2
|
||||
CC = gcc
|
||||
OBJDIR = ../obj/amiga
|
||||
ZIP = lha
|
||||
ZIPOPT = a
|
||||
NOTTF = 1
|
||||
|
||||
else
|
||||
ifeq ($(PLATFORM),Darwin) # 2
|
||||
@ -129,21 +130,6 @@ else
|
||||
ZIPOPT = a
|
||||
PLATFORMFILES = ../misc/grafx2.info
|
||||
|
||||
else
|
||||
ifeq ($(PLATFORM),AMIGA) # 5
|
||||
# AmigaOS 3.x specific (building with gcc)
|
||||
DELCOMMAND = rm -rf
|
||||
MKDIR = mkdir -p
|
||||
RMDIR = rmdir
|
||||
CP = cp
|
||||
BIN = ../bin/grafx2
|
||||
COPT = -Wall -gstabs -c `sdl-config --cflags` $(TTFCOPT)
|
||||
LOPT = -lSDL_image `sdl-config --libs` -lpng -ljpeg -lz $(TTFLOPT) -lfreetype
|
||||
CC = gcc
|
||||
OBJDIR = ../obj/amiga
|
||||
ZIP = lha
|
||||
ZIPOPT = a
|
||||
|
||||
else
|
||||
ifeq ($(PLATFORM),BeOS) # 6
|
||||
#BeOS specific
|
||||
@ -201,24 +187,6 @@ else
|
||||
OBJDIR = ../obj/unix
|
||||
X11LOPT = -lX11
|
||||
CC = gcc
|
||||
|
||||
else
|
||||
ifeq ($(findstring Kickstart,$(shell version)),Kickstart) # 9
|
||||
# Classic amiga without gcc. Use vbcc.
|
||||
PLATFORM = amiga-vbcc
|
||||
DELCOMMAND = delete
|
||||
MKDIR = makedir
|
||||
RMDIR= delete
|
||||
CP = copy
|
||||
BIN = ../bin/grafx2
|
||||
COPT = -c99 -Ivbcc:PosixLib/include -D__amigaos__ $(TTFCOPT)
|
||||
CC = vc
|
||||
OBJDIR = ../obj/amiga-vbcc
|
||||
ZIP = lha
|
||||
ZIPOPT = a
|
||||
|
||||
NOTTF = 1
|
||||
|
||||
else
|
||||
|
||||
# Finally, the default rules that work fine for most unix/gcc systems, linux and freebsd are tested.
|
||||
@ -281,8 +249,6 @@ else
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
### BUILD SETTINGS are set according to vars set in the platform selection, the "overridable defaults", and environment variables set before launching make
|
||||
|
||||
@ -335,7 +301,9 @@ OBJ = $(OBJDIR)/main.o $(OBJDIR)/init.o $(OBJDIR)/graph.o $(OBJDIR)/sdlscreen.o
|
||||
|
||||
SKIN_FILES = ../share/grafx2/skins/skin_classic.png ../share/grafx2/skins/skin_modern.png ../share/grafx2/skins/skin_DPaint.png ../share/grafx2/skins/font_Classic.png ../share/grafx2/skins/font_Fun.png ../share/grafx2/skins/font_Fairlight.png ../share/grafx2/skins/font_Melon.png ../share/grafx2/skins/font_DPaint.png ../share/grafx2/skins/skin_scenish.png ../share/grafx2/skins/font_Seen.png
|
||||
|
||||
SCRIPT_FILES = ../share/grafx2/scripts/bru_db_Amigaball.lua ../share/grafx2/scripts/bru_db_ColorSphere.lua ../share/grafx2/scripts/bru_db_FindAA.lua ../share/grafx2/scripts/bru_db_Fisheye.lua ../share/grafx2/scripts/bru_db_GrayscaleAvg.lua ../share/grafx2/scripts/bru_db_GrayscaleDesat.lua ../share/grafx2/scripts/bru_db_Halfsmooth.lua ../share/grafx2/scripts/bru_db_Mandelbrot.lua ../share/grafx2/scripts/bru_db_Waves.lua ../share/grafx2/scripts/pal_db_Desaturate.lua ../share/grafx2/scripts/pal_db_ExpandColors.lua ../share/grafx2/scripts/pal_db_FillColorCube.lua ../share/grafx2/scripts/pal_db_InvertedRGB.lua ../share/grafx2/scripts/pal_db_Set3bit.lua ../share/grafx2/scripts/pal_db_Set6bit.lua ../share/grafx2/scripts/pal_db_SetC64Palette.lua ../share/grafx2/scripts/pal_db_ShiftHue.lua ../share/grafx2/scripts/pic_db_Pic2isometric.lua ../share/grafx2/scripts/pic_db_Rainbow-Dark2Bright.lua ../share/grafx2/scripts/pic_db_SierpinskyCarpet.lua ../share/grafx2/scripts/pic_db_SierpinskyTriangle.lua ../share/grafx2/scripts/pic_ni_Colorspace12bit.lua ../share/grafx2/scripts/pic_ni_Colorspace15bit.lua ../share/grafx2/scripts/pic_ni_Colorspace18bit.lua ../share/grafx2/scripts/pic_ni_GlassGridFilter.lua ../share/grafx2/scripts/pic_ni_Grid8.lua ../share/grafx2/scripts/pic_ni_Grid8red.lua ../share/grafx2/scripts/pic_ni_GridIso.lua ../share/grafx2/scripts/pic_ni_PaletteX1.lua ../share/grafx2/scripts/pic_ni_PaletteX8.lua ../share/grafx2/scripts/scn_db_RemapImage2RGB.lua ../share/grafx2/scripts/scn_db_RemapImage2RGB_ed.lua ../share/grafx2/scripts/scn_db_RemapImageTo3bitPal.lua
|
||||
SCRIPT_FILES1 = ../share/grafx2/scripts/bru_db_Amigaball.lua ../share/grafx2/scripts/bru_db_ColorSphere.lua ../share/grafx2/scripts/bru_db_FindAA.lua ../share/grafx2/scripts/bru_db_Fisheye.lua ../share/grafx2/scripts/bru_db_GrayscaleAvg.lua ../share/grafx2/scripts/bru_db_GrayscaleDesat.lua ../share/grafx2/scripts/bru_db_Halfsmooth.lua ../share/grafx2/scripts/bru_db_Mandelbrot.lua ../share/grafx2/scripts/bru_db_Waves.lua ../share/grafx2/scripts/pal_db_Desaturate.lua ../share/grafx2/scripts/pal_db_ExpandColors.lua ../share/grafx2/scripts/pal_db_FillColorCube.lua ../share/grafx2/scripts/pal_db_InvertedRGB.lua ../share/grafx2/scripts/pal_db_Set3bit.lua ../share/grafx2/scripts/pal_db_Set6bit.lua ../share/grafx2/scripts/pal_db_SetC64Palette.lua ../share/grafx2/scripts/pal_db_ShiftHue.lua ../share/grafx2/scripts/pic_db_Pic2isometric.lua ../share/grafx2/scripts/pic_db_Rainbow-Dark2Bright.lua ../share/grafx2/scripts/pic_db_SierpinskyCarpet.lua
|
||||
SCRIPT_FILES2 = ../share/grafx2/scripts/pic_db_SierpinskyTriangle.lua ../share/grafx2/scripts/pic_ni_Colorspace12bit.lua ../share/grafx2/scripts/pic_ni_Colorspace15bit.lua ../share/grafx2/scripts/pic_ni_Colorspace18bit.lua ../share/grafx2/scripts/pic_ni_GlassGridFilter.lua ../share/grafx2/scripts/pic_ni_Grid8.lua ../share/grafx2/scripts/pic_ni_Grid8red.lua ../share/grafx2/scripts/pic_ni_GridIso.lua ../share/grafx2/scripts/pic_ni_PaletteX1.lua ../share/grafx2/scripts/pic_ni_PaletteX8.lua ../share/grafx2/scripts/scn_db_RemapImage2RGB.lua ../share/grafx2/scripts/scn_db_RemapImage2RGB_ed.lua ../share/grafx2/scripts/scn_db_RemapImageTo3bitPal.lua
|
||||
SCRIPT_FILES1= SCRIPT_FILES1 SCRIPT_FILES2
|
||||
|
||||
ifeq ($(PLATFORM),Darwin)
|
||||
all : $(MACAPPEXE)
|
||||
|
||||
@ -19,6 +19,21 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Grafx2; if not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
|
||||
#if defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__) || defined(__amigaos__)
|
||||
#include <proto/dos.h>
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
#define isHidden(x) (0)
|
||||
#elif defined(__WIN32__)
|
||||
#include <dirent.h>
|
||||
#include <windows.h>
|
||||
#define isHidden(x) (GetFileAttributesA((x)->d_name)&FILE_ATTRIBUTE_HIDDEN)
|
||||
#else
|
||||
#include <dirent.h>
|
||||
#define isHidden(x) ((x)->d_name[0]=='.')
|
||||
#endif
|
||||
|
||||
#define _XOPEN_SOURCE 500
|
||||
|
||||
#include <fcntl.h>
|
||||
@ -62,18 +77,6 @@
|
||||
#define __attribute__(x)
|
||||
#endif
|
||||
|
||||
#if defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__) || defined(__amigaos__)
|
||||
#include <proto/dos.h>
|
||||
#include <dirent.h>
|
||||
#define isHidden(x) (0)
|
||||
#elif defined(__WIN32__)
|
||||
#include <dirent.h>
|
||||
#include <windows.h>
|
||||
#define isHidden(x) (GetFileAttributesA((x)->d_name)&FILE_ATTRIBUTE_HIDDEN)
|
||||
#else
|
||||
#include <dirent.h>
|
||||
#define isHidden(x) ((x)->d_name[0]=='.')
|
||||
#endif
|
||||
|
||||
extern char Program_version[]; // generated in pversion.c
|
||||
|
||||
|
||||
@ -21,18 +21,10 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Grafx2; if not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include <ctype.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#if defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__) || defined(__amigaos__)
|
||||
#include <proto/dos.h>
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
#define isHidden(x) (0)
|
||||
#elif defined(__WIN32__)
|
||||
@ -44,6 +36,16 @@
|
||||
#define isHidden(x) ((x)->d_name[0]=='.')
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include <ctype.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "const.h"
|
||||
#include "struct.h"
|
||||
#include "global.h"
|
||||
|
||||
10
src/init.c
10
src/init.c
@ -29,6 +29,12 @@
|
||||
#if defined(__WIN32__) || defined(__linux__)
|
||||
#define GRAFX2_CATCHES_SIGNALS
|
||||
#endif
|
||||
|
||||
#if defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__) || defined(__amigaos__)
|
||||
#include <proto/exec.h>
|
||||
#include <proto/dos.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
//#include <fcntl.h>
|
||||
#include <string.h>
|
||||
@ -44,10 +50,6 @@
|
||||
#if defined(__WIN32__)
|
||||
#include <windows.h> // GetLogicalDrives(), GetDriveType(), DRIVE_*
|
||||
#endif
|
||||
#if defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__) || defined(__amigaos__)
|
||||
#include <proto/exec.h>
|
||||
#include <proto/dos.h>
|
||||
#endif
|
||||
#ifdef GRAFX2_CATCHES_SIGNALS
|
||||
#include <signal.h>
|
||||
#endif
|
||||
|
||||
4
src/io.c
4
src/io.c
@ -299,6 +299,9 @@ int Lock_file_handle = -1;
|
||||
|
||||
byte Create_lock_file(const char *file_directory)
|
||||
{
|
||||
#ifdef __amigaos__
|
||||
#warning "Missing code for your platform, please check and correct!"
|
||||
#else
|
||||
char lock_filename[MAX_PATH_CHARACTERS];
|
||||
|
||||
strcpy(lock_filename,file_directory);
|
||||
@ -333,6 +336,7 @@ byte Create_lock_file(const char *file_directory)
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
#endif // __amigaos__
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -23,15 +23,22 @@
|
||||
*/
|
||||
#define GLOBAL_VARIABLES
|
||||
|
||||
// time.h defines timeval which conflicts with the one in amiga SDK
|
||||
#ifdef __amigaos__
|
||||
#include <devices/timer.h>
|
||||
#else
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
#include <SDL.h>
|
||||
#include <SDL_image.h>
|
||||
|
||||
|
||||
// There is no WM on the GP2X...
|
||||
#ifndef __GP2X__
|
||||
#include <SDL_syswm.h>
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
// the path. So this implementation is limited, it's really better to
|
||||
// use realpath() if your platform has it.
|
||||
|
||||
#if defined(__GP2X__)
|
||||
#if defined(__GP2X__) || defined(__amigaos__)
|
||||
// This is a random default value ...
|
||||
#define PATH_MAX 32768
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user