mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-22 02:53:09 +00:00
Make for Freebsd
This commit is contained in:
8
Makefile
8
Makefile
@@ -1,16 +1,20 @@
|
||||
.PHONY : all clean
|
||||
|
||||
CFLAGS = -g -Wall
|
||||
LDFLAGS = -lpthread -llua -ldl -lm
|
||||
LDFLAGS = -lpthread -llua -lm
|
||||
|
||||
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
|
||||
ifeq ($(uname_S), Darwin)
|
||||
SHARED = -fPIC -dynamiclib -Wl,-undefined,dynamic_lookup
|
||||
else
|
||||
LDFLAGS += -ldl -lrt -Wl,-E
|
||||
LDFLAGS += -lrt -Wl,-E
|
||||
SHARED = -fPIC --shared
|
||||
endif
|
||||
|
||||
ifneq ($(uname_S), FreeBSD)
|
||||
LDFLAGS += -ldl
|
||||
endif
|
||||
|
||||
all : \
|
||||
skynet \
|
||||
service/snlua.so \
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include <pthread.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "skynet.h"
|
||||
#include "mread.h"
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -15,13 +15,16 @@
|
||||
#endif
|
||||
/* ! Test for polling API */
|
||||
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef HAVE_EPOLL
|
||||
#include <sys/epoll.h>
|
||||
#elif HAVE_KQUEUE
|
||||
#include <sys/event.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <unistd.h>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "skynet.h"
|
||||
#include "skynet_harbor.h"
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "skynet.h"
|
||||
#include "skynet_harbor.h"
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
Reference in New Issue
Block a user