mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-21 18:43:09 +00:00
port to OpenBSD (#2157)
This commit is contained in:
@@ -30,7 +30,7 @@ CMCFLAGS=
|
||||
|
||||
# == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE =======
|
||||
|
||||
PLATS= guess aix bsd c89 freebsd generic ios linux macosx mingw posix solaris
|
||||
PLATS= guess aix bsd c89 freebsd generic ios linux macosx mingw posix solaris openbsd
|
||||
|
||||
LUA_A= liblua.a
|
||||
CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o
|
||||
@@ -112,7 +112,7 @@ c89:
|
||||
@echo '*** with LUA_USE_C89 to ensure consistency'
|
||||
@echo ''
|
||||
|
||||
FreeBSD NetBSD OpenBSD freebsd:
|
||||
FreeBSD NetBSD OpenBSD freebsd openbsd:
|
||||
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX -DLUA_USE_READLINE -I/usr/include/edit" SYSLIBS="-Wl,-E -ledit" CC="cc"
|
||||
|
||||
generic: $(ALL)
|
||||
|
||||
@@ -13,7 +13,7 @@ For Linux, install autoconf first for jemalloc:
|
||||
```
|
||||
git clone https://github.com/cloudwu/skynet.git
|
||||
cd skynet
|
||||
make 'PLATFORM' # PLATFORM can be linux, macosx, freebsd now
|
||||
make 'PLATFORM' # PLATFORM can be linux, macosx, freebsd, openbsd now
|
||||
```
|
||||
|
||||
Or:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
PLAT ?= none
|
||||
PLATS = linux freebsd macosx mingw
|
||||
PLATS = linux freebsd openbsd macosx mingw
|
||||
|
||||
CC ?= gcc
|
||||
|
||||
@@ -25,6 +25,7 @@ EXPORT := -Wl,-E
|
||||
linux : PLAT = linux
|
||||
macosx : PLAT = macosx
|
||||
freebsd : PLAT = freebsd
|
||||
openbsd : PLAT = openbsd
|
||||
mingw : PLAT = mingw
|
||||
|
||||
macosx : SHARED := -fPIC -dynamiclib -Wl,-undefined,dynamic_lookup
|
||||
@@ -34,10 +35,10 @@ linux freebsd : SKYNET_LIBS += -lrt
|
||||
|
||||
# Turn off jemalloc and malloc hook on macosx
|
||||
|
||||
macosx : MALLOC_STATICLIB :=
|
||||
macosx : SKYNET_DEFINES :=-DNOUSE_JEMALLOC
|
||||
openbsd macosx : MALLOC_STATICLIB :=
|
||||
openbsd macosx : SKYNET_DEFINES :=-DNOUSE_JEMALLOC
|
||||
|
||||
linux macosx freebsd :
|
||||
linux macosx freebsd openbsd :
|
||||
$(MAKE) all PLAT=$@ SKYNET_LIBS="$(SKYNET_LIBS)" SHARED="$(SHARED)" EXPORT="$(EXPORT)" MALLOC_STATICLIB="$(MALLOC_STATICLIB)" SKYNET_DEFINES="$(SKYNET_DEFINES)"
|
||||
|
||||
mingw :
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "spinlock.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/select.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <unistd.h>
|
||||
|
||||
Reference in New Issue
Block a user