Add NetBSD support
parent
c7d9e5afef
commit
ac2fb043cf
8
Makefile
8
Makefile
|
@ -56,6 +56,8 @@ default:
|
||||||
@echo "linux-arm"
|
@echo "linux-arm"
|
||||||
@echo "openbsd-x86-32"
|
@echo "openbsd-x86-32"
|
||||||
@echo "openbsd-x86-64"
|
@echo "openbsd-x86-64"
|
||||||
|
@echo "netbsd-x86-32"
|
||||||
|
@echo "netbsd-x86-64"
|
||||||
@echo "macosx-x86-32"
|
@echo "macosx-x86-32"
|
||||||
@echo "macosx-x86-64"
|
@echo "macosx-x86-64"
|
||||||
@echo "macosx-ppc"
|
@echo "macosx-ppc"
|
||||||
|
@ -83,6 +85,12 @@ freebsd-x86-32:
|
||||||
freebsd-x86-64:
|
freebsd-x86-64:
|
||||||
$(MAKE) $(EXECUTABLE) CONFIG=vm/Config.freebsd.x86.64
|
$(MAKE) $(EXECUTABLE) CONFIG=vm/Config.freebsd.x86.64
|
||||||
|
|
||||||
|
netbsd-x86-32:
|
||||||
|
$(MAKE) $(EXECUTABLE) CONFIG=vm/Config.netbsd.x86.32
|
||||||
|
|
||||||
|
netbsd-x86-64:
|
||||||
|
$(MAKE) $(EXECUTABLE) CONFIG=vm/Config.netbsd.x86.64
|
||||||
|
|
||||||
macosx-freetype:
|
macosx-freetype:
|
||||||
ln -sf libfreetype.6.dylib \
|
ln -sf libfreetype.6.dylib \
|
||||||
Factor.app/Contents/Frameworks/libfreetype.dylib
|
Factor.app/Contents/Frameworks/libfreetype.dylib
|
||||||
|
|
|
@ -49,6 +49,7 @@ HELP: os
|
||||||
"linux"
|
"linux"
|
||||||
"macosx"
|
"macosx"
|
||||||
"openbsd"
|
"openbsd"
|
||||||
|
"netbsd"
|
||||||
"solaris"
|
"solaris"
|
||||||
"windows"
|
"windows"
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,11 +39,11 @@ splitting assocs ;
|
||||||
|
|
||||||
: unix? ( -- ? )
|
: unix? ( -- ? )
|
||||||
os {
|
os {
|
||||||
"freebsd" "openbsd" "linux" "macosx" "solaris"
|
"freebsd" "openbsd" "netbsd" "linux" "macosx" "solaris"
|
||||||
} member? ;
|
} member? ;
|
||||||
|
|
||||||
: bsd? ( -- ? )
|
: bsd? ( -- ? )
|
||||||
os { "freebsd" "openbsd" "macosx" } member? ;
|
os { "freebsd" "openbsd" "netbsd" "macosx" } member? ;
|
||||||
|
|
||||||
: linux? ( -- ? )
|
: linux? ( -- ? )
|
||||||
os "linux" = ;
|
os "linux" = ;
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
include vm/Config.unix
|
||||||
|
PLAF_DLL_OBJS += vm/os-genunix.o vm/os-netbsd.o
|
||||||
|
CFLAGS += -export-dynamic
|
||||||
|
LIBS = -L/usr/local/lib/ -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib -lm $(X11_UI_LIBS)
|
|
@ -0,0 +1,2 @@
|
||||||
|
include vm/Config.netbsd
|
||||||
|
include vm/Config.x86.32
|
|
@ -0,0 +1,2 @@
|
||||||
|
include vm/Config.netbsd
|
||||||
|
include vm/Config.x86.64
|
|
@ -0,0 +1,6 @@
|
||||||
|
#include "master.h"
|
||||||
|
|
||||||
|
const char *vm_executable_path(void)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
#include <ucontext.h>
|
||||||
|
|
||||||
|
#define ucontext_stack_pointer(uap) ((void *)_UC_MACHINE_SP((ucontext_t *)uap))
|
||||||
|
#define UAP_PROGRAM_COUNTER(uap) _UC_MACHINE_PC((ucontext_t *)uap)
|
||||||
|
|
||||||
|
#define UNKNOWN_TYPE_P(file) ((file)->d_type == DT_UNKNOWN)
|
||||||
|
#define DIRECTORY_P(file) ((file)->d_type == DT_DIR)
|
||||||
|
|
||||||
|
extern char **environ;
|
|
@ -58,6 +58,9 @@
|
||||||
#else
|
#else
|
||||||
#error "Unsupported OpenBSD flavor"
|
#error "Unsupported OpenBSD flavor"
|
||||||
#endif
|
#endif
|
||||||
|
#elif defined(__NetBSD__)
|
||||||
|
#define FACTOR_OS_STRING "netbsd"
|
||||||
|
#include "os-netbsd.h"
|
||||||
#elif defined(linux)
|
#elif defined(linux)
|
||||||
#define FACTOR_OS_STRING "linux"
|
#define FACTOR_OS_STRING "linux"
|
||||||
#include "os-linux.h"
|
#include "os-linux.h"
|
||||||
|
|
Loading…
Reference in New Issue