AmigaOS 68k build fixes by Artur Jarosik. Thanks!
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@770 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
6f37000cd5
commit
e5fc3a9ef3
50
Makefile
50
Makefile
@ -70,8 +70,8 @@ else
|
|||||||
OBJDIR = obj/amiga
|
OBJDIR = obj/amiga
|
||||||
ZIP = lha
|
ZIP = lha
|
||||||
ZIPOPT = a
|
ZIPOPT = a
|
||||||
else ifeq ($(PLATFORM),AROS)
|
|
||||||
|
|
||||||
|
else ifeq ($(PLATFORM),AROS)
|
||||||
#AROS specific
|
#AROS specific
|
||||||
DELCOMMAND = rm -rf
|
DELCOMMAND = rm -rf
|
||||||
MKDIR = mkdir -p
|
MKDIR = mkdir -p
|
||||||
@ -84,8 +84,8 @@ else
|
|||||||
OBJDIR = obj/aros
|
OBJDIR = obj/aros
|
||||||
ZIP = lha
|
ZIP = lha
|
||||||
ZIPOPT = a
|
ZIPOPT = a
|
||||||
else ifeq ($(PLATFORM),MorphOS)
|
|
||||||
|
|
||||||
|
else ifeq ($(PLATFORM),MorphOS)
|
||||||
#MorphOS specific
|
#MorphOS specific
|
||||||
DELCOMMAND = rm -rf
|
DELCOMMAND = rm -rf
|
||||||
MKDIR = mkdir -p
|
MKDIR = mkdir -p
|
||||||
@ -98,8 +98,22 @@ else
|
|||||||
OBJDIR = obj/morphos
|
OBJDIR = obj/morphos
|
||||||
ZIP = lha
|
ZIP = lha
|
||||||
ZIPOPT = a
|
ZIPOPT = a
|
||||||
else ifeq ($(PLATFORM),BeOS)
|
|
||||||
|
|
||||||
|
else ifeq ($(PLATFORM),AMIGA)
|
||||||
|
# AmigaOS 3.x specific (building with gcc)
|
||||||
|
DELCOMMAND = rm -rf
|
||||||
|
MKDIR = mkdir -p
|
||||||
|
RMDIR = rmdir
|
||||||
|
CP = cp
|
||||||
|
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)
|
||||||
#BeOS specific
|
#BeOS specific
|
||||||
DELCOMMAND = rm -rf
|
DELCOMMAND = rm -rf
|
||||||
MKDIR = mkdir -p
|
MKDIR = mkdir -p
|
||||||
@ -111,8 +125,8 @@ else
|
|||||||
CC = gcc
|
CC = gcc
|
||||||
OBJDIR = obj/beos
|
OBJDIR = obj/beos
|
||||||
ZIP = zip
|
ZIP = zip
|
||||||
else ifeq ($(PLATFORM),Haiku)
|
|
||||||
|
|
||||||
|
else ifeq ($(PLATFORM),Haiku)
|
||||||
#Haiku specific
|
#Haiku specific
|
||||||
DELCOMMAND = rm -rf
|
DELCOMMAND = rm -rf
|
||||||
MKDIR = mkdir -p
|
MKDIR = mkdir -p
|
||||||
@ -124,8 +138,8 @@ else
|
|||||||
CC = gcc
|
CC = gcc
|
||||||
OBJDIR = obj/haiku
|
OBJDIR = obj/haiku
|
||||||
ZIP = zip
|
ZIP = zip
|
||||||
else ifeq ($(PLATFORM),skyos)
|
|
||||||
|
|
||||||
|
else ifeq ($(PLATFORM),skyos)
|
||||||
#SkyOS specific
|
#SkyOS specific
|
||||||
DELCOMMAND = rm -rf
|
DELCOMMAND = rm -rf
|
||||||
MKDIR = mkdir -p
|
MKDIR = mkdir -p
|
||||||
@ -139,33 +153,8 @@ else
|
|||||||
ZIP = zip
|
ZIP = zip
|
||||||
else
|
else
|
||||||
|
|
||||||
# If we got here, we haven't found any specific system for uname. There is a little problem : Amiga 68k does not have uname !
|
|
||||||
|
|
||||||
# The trick here is to use the "version" command and see if the answer starts with Kickstart. This is the typical footprint of an amiga system.
|
|
||||||
# Te problem is these commands are also launched for other platforms where the "version" command is not available, so sh gives an error under linux/freebsd...
|
|
||||||
$(shell version >PIPE:gfx2ver)
|
|
||||||
AMIGA=$(shell sed -e s/\(Kickstart\).*/\1/g <PIPE:gfx2ver)
|
|
||||||
|
|
||||||
# Amiga classic
|
|
||||||
ifeq ($(AMIGA),Kickstart)
|
|
||||||
DELCOMMAND = Delete -r
|
|
||||||
MKDIR = Makedir
|
|
||||||
RMDIR = Delete
|
|
||||||
CP = copy
|
|
||||||
ZIP = zip
|
|
||||||
PLATFORMFILS = gfx2.png
|
|
||||||
BIN = grafx2
|
|
||||||
COPT = -c99
|
|
||||||
LOPT =
|
|
||||||
CC = Logiciels:vbcc/bin/vc
|
|
||||||
OBJDIR = obj/Amiga68k
|
|
||||||
# No strip command with vbcc, do some dummy thing to make Make happy
|
|
||||||
STRIP = echo
|
|
||||||
else
|
|
||||||
|
|
||||||
# Finally, the default rules that work fine for most unix/gcc systems, linux and freebsd are tested.
|
# Finally, the default rules that work fine for most unix/gcc systems, linux and freebsd are tested.
|
||||||
# Linux and FreeBSD specific (default rules)
|
# Linux and FreeBSD specific (default rules)
|
||||||
$(shell rm PIPE:gfx2ver)
|
|
||||||
DELCOMMAND = rm -rf
|
DELCOMMAND = rm -rf
|
||||||
MKDIR = mkdir -p
|
MKDIR = mkdir -p
|
||||||
RMDIR = rmdir
|
RMDIR = rmdir
|
||||||
@ -205,7 +194,6 @@ else
|
|||||||
endif
|
endif
|
||||||
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
|
### BUILD SETTINGS are set according to vars set in the platform selection, the "overridable defaults", and environment variables set before launching make
|
||||||
|
|
||||||
|
|||||||
@ -29,7 +29,7 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#if defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__)
|
#if defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__) || defined(__amigaos__)
|
||||||
#include <proto/dos.h>
|
#include <proto/dos.h>
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#define isHidden(x) (0)
|
#define isHidden(x) (0)
|
||||||
@ -254,7 +254,7 @@ void Read_list_of_files(byte selected_format)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__MORPHOS__) || defined (__amigaos4__) || defined(__amigaos__)
|
#if defined(__MORPHOS__) || defined(__AROS__) || defined (__amigaos4__) || defined(__amigaos__)
|
||||||
Add_element_to_list("/",1); // on amiga systems, / means parent. And there is no ..
|
Add_element_to_list("/",1); // on amiga systems, / means parent. And there is no ..
|
||||||
Filelist_nb_directories ++;
|
Filelist_nb_directories ++;
|
||||||
#endif
|
#endif
|
||||||
@ -265,7 +265,7 @@ void Read_list_of_files(byte selected_format)
|
|||||||
Filelist_nb_elements=Filelist_nb_directories+Filelist_nb_files;
|
Filelist_nb_elements=Filelist_nb_directories+Filelist_nb_files;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__)
|
#if defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__) || defined(__amigaos__)
|
||||||
void bstrtostr( BSTR in, STRPTR out, TEXT max )
|
void bstrtostr( BSTR in, STRPTR out, TEXT max )
|
||||||
{
|
{
|
||||||
STRPTR iptr;
|
STRPTR iptr;
|
||||||
@ -290,7 +290,7 @@ void Read_list_of_drives(void)
|
|||||||
Filelist_nb_files=0;
|
Filelist_nb_files=0;
|
||||||
Filelist_nb_directories=0;
|
Filelist_nb_directories=0;
|
||||||
|
|
||||||
#if defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__)
|
#if defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__) || defined(__amigaos__)
|
||||||
{
|
{
|
||||||
struct DosList *dl;
|
struct DosList *dl;
|
||||||
char tmp[256];
|
char tmp[256];
|
||||||
|
|||||||
@ -292,6 +292,10 @@ static const T_Help_table helptable_credits[] =
|
|||||||
HELP_TEXT ("")
|
HELP_TEXT ("")
|
||||||
HELP_TITLE(" OTHER MACHINES PORTS")
|
HELP_TITLE(" OTHER MACHINES PORTS")
|
||||||
HELP_TEXT ("")
|
HELP_TEXT ("")
|
||||||
|
HELP_BOLD (" AMIGA OS 3 PORT")
|
||||||
|
HELP_TEXT ("")
|
||||||
|
HELP_TEXT (" Artur Jarosik (arturjarosik\100gmail.com)")
|
||||||
|
HELP_TEXT ("")
|
||||||
HELP_BOLD (" AMIGA OS 4 PORT")
|
HELP_BOLD (" AMIGA OS 4 PORT")
|
||||||
HELP_TEXT ("")
|
HELP_TEXT ("")
|
||||||
HELP_TEXT (" Peter Gordon (pete\100petergordon.org.uk)")
|
HELP_TEXT (" Peter Gordon (pete\100petergordon.org.uk)")
|
||||||
|
|||||||
4
init.c
4
init.c
@ -39,7 +39,7 @@
|
|||||||
#if defined(__WIN32__)
|
#if defined(__WIN32__)
|
||||||
#include <windows.h> // GetLogicalDrives(), GetDriveType(), DRIVE_*
|
#include <windows.h> // GetLogicalDrives(), GetDriveType(), DRIVE_*
|
||||||
#endif
|
#endif
|
||||||
#if defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__)
|
#if defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__) || defined(__amigaos__)
|
||||||
#include <proto/exec.h>
|
#include <proto/exec.h>
|
||||||
#include <proto/dos.h>
|
#include <proto/dos.h>
|
||||||
#endif
|
#endif
|
||||||
@ -71,7 +71,7 @@
|
|||||||
|
|
||||||
// Rechercher la liste et le type des lecteurs de la machine
|
// Rechercher la liste et le type des lecteurs de la machine
|
||||||
|
|
||||||
#if defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__)
|
#if defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__) || defined(__amigaos__)
|
||||||
void bstrtostr( BSTR in, STRPTR out, TEXT max );
|
void bstrtostr( BSTR in, STRPTR out, TEXT max );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
4
misc.c
4
misc.c
@ -710,7 +710,7 @@ void Zoom_a_line(byte* original_line, byte* zoomed_line,
|
|||||||
#include <sys/sysctl.h>
|
#include <sys/sysctl.h>
|
||||||
#elif defined(__BEOS__) || defined(__HAIKU__)
|
#elif defined(__BEOS__) || defined(__HAIKU__)
|
||||||
// sysinfo not implemented
|
// sysinfo not implemented
|
||||||
#elif defined(__AROS__) || defined(__amigaos4__) || defined(__MORPHOS__)
|
#elif defined(__AROS__) || defined(__amigaos4__) || defined(__MORPHOS__) || defined(__amigaos__)
|
||||||
#include <proto/exec.h>
|
#include <proto/exec.h>
|
||||||
#elif defined(__SKYOS__)
|
#elif defined(__SKYOS__)
|
||||||
#include <skyos/sysinfo.h>
|
#include <skyos/sysinfo.h>
|
||||||
@ -744,7 +744,7 @@ unsigned long Memory_free(void)
|
|||||||
len = sizeof(maxmem);
|
len = sizeof(maxmem);
|
||||||
sysctl(mib,2,&maxmem,&len,NULL,0);
|
sysctl(mib,2,&maxmem,&len,NULL,0);
|
||||||
return maxmem;
|
return maxmem;
|
||||||
#elif defined(__BEOS__) || defined(__HAIKU__) || defined(__SKYOS__) || defined(__amigaos4__)
|
#elif defined(__BEOS__) || defined(__HAIKU__) || defined(__SKYOS__) || defined(__amigaos4__) || defined(__amigaos__)
|
||||||
// No <sys/sysctl.h> on BeOS or Haiku
|
// No <sys/sysctl.h> on BeOS or Haiku
|
||||||
// AvailMem is misleading on os4 (os4 caches stuff in memory that you can still allocate)
|
// AvailMem is misleading on os4 (os4 caches stuff in memory that you can still allocate)
|
||||||
#warning "There is missing code there for your platform ! please check and correct :)"
|
#warning "There is missing code there for your platform ! please check and correct :)"
|
||||||
|
|||||||
@ -17,7 +17,8 @@
|
|||||||
along with this program; if not, write to the Free Software Foundation,
|
along with this program; if not, write to the Free Software Foundation,
|
||||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||||
|
|
||||||
#if(!defined(__WIN32__))&&(!defined(__amigaos4__))&&(!defined(__AROS__))&&(!defined(__MORPHOS__))
|
// This file is not used on some platforms, so don't do anything for them
|
||||||
|
#if(!defined(__WIN32__))&&(!defined(__amigaos4__))&&(!defined(__AROS__))&&(!defined(__MORPHOS__))&&(!defined(__amigaos__))
|
||||||
|
|
||||||
// We don't use autoconf and all that in grafx2, so let's do the config here ...
|
// We don't use autoconf and all that in grafx2, so let's do the config here ...
|
||||||
#if defined(__macosx__) || defined(__FreeBSD__) // MacOS X is POSIX compliant
|
#if defined(__macosx__) || defined(__FreeBSD__) // MacOS X is POSIX compliant
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#if defined(__AROS__) || defined(__BEOS__) || defined(__MORPHOS__) || defined(__GP2X__)
|
#if defined(__AROS__) || defined(__BEOS__) || defined(__MORPHOS__) || defined(__GP2X__) || defined(__amigaos__)
|
||||||
// These platforms don't have realpath().
|
// These platforms don't have realpath().
|
||||||
// We use the following implementation, found in:
|
// We use the following implementation, found in:
|
||||||
// http://amiga.sourceforge.net/amigadevhelp/FUNCTIONS/GeekGadgets/realpath/ex02_realpath.c
|
// http://amiga.sourceforge.net/amigadevhelp/FUNCTIONS/GeekGadgets/realpath/ex02_realpath.c
|
||||||
@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
if (chdir(path)) {
|
if (chdir(path)) {
|
||||||
if (errno == ENOTDIR) {
|
if (errno == ENOTDIR) {
|
||||||
#if defined(__WIN32__) || defined(__MORPHOS__)
|
#if defined(__WIN32__) || defined(__MORPHOS__) || defined(__amigaos__)
|
||||||
// No symbolic links and no readlink()
|
// No symbolic links and no readlink()
|
||||||
l = -1;
|
l = -1;
|
||||||
#else
|
#else
|
||||||
|
|||||||
6
setup.c
6
setup.c
@ -51,7 +51,7 @@ int Create_ConfigDirectory(char * config_dir)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__macosx__) || defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__)
|
#if defined(__macosx__) || defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__) || defined(__amigaos__)
|
||||||
#define ARG_UNUSED __attribute__((unused))
|
#define ARG_UNUSED __attribute__((unused))
|
||||||
#else
|
#else
|
||||||
#define ARG_UNUSED
|
#define ARG_UNUSED
|
||||||
@ -72,8 +72,8 @@ void Set_program_directory(ARG_UNUSED const char * argv0,char * program_dir)
|
|||||||
// Append trailing slash
|
// Append trailing slash
|
||||||
strcat(program_dir ,"/");
|
strcat(program_dir ,"/");
|
||||||
|
|
||||||
// AmigaOS4: hard-coded volume name.
|
// AmigaOS and alike: hard-coded volume name.
|
||||||
#elif defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__)
|
#elif defined(__amigaos4__) || defined(__AROS__) || defined(__MORPHOS__) || defined(__amigaos__)
|
||||||
strcpy(program_dir,"PROGDIR:");
|
strcpy(program_dir,"PROGDIR:");
|
||||||
|
|
||||||
// Others: The part of argv[0] before the executable name.
|
// Others: The part of argv[0] before the executable name.
|
||||||
|
|||||||
2
text.c
2
text.c
@ -339,7 +339,7 @@ void Init_text(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#elif defined(__amigaos4__)
|
#elif defined(__amigaos4__) || defined(__amigaos__)
|
||||||
#ifndef NOTTF
|
#ifndef NOTTF
|
||||||
For_each_file( "FONTS:_TrueType", Add_font );
|
For_each_file( "FONTS:_TrueType", Add_font );
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user