Make for Freebsd

This commit is contained in:
云风
2013-05-08 17:26:43 +08:00
parent 79c92bbf10
commit fdb37bc110
7 changed files with 15 additions and 3 deletions

View File

@@ -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 \

View File

@@ -1,4 +1,5 @@
#include <pthread.h>
#include <netinet/in.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>

View File

@@ -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>

View File

@@ -1,6 +1,7 @@
#include "skynet.h"
#include "mread.h"
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <stdlib.h>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>