You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
570 B
Makefile
30 lines
570 B
Makefile
SKYNET_ROOT ?= ../../skynet
|
|
include $(SKYNET_ROOT)/platform.mk
|
|
|
|
PLAT ?= none
|
|
|
|
TARGET = ../../luaclib/crab.so
|
|
|
|
ifeq ($(PLAT), macosx)
|
|
CFLAGS = -g -O2 -dynamiclib -Wl,-undefined,dynamic_lookup
|
|
else
|
|
ifeq ($(PLAT), linux)
|
|
CFLAGS = -g -O2 -shared -fPIC
|
|
endif
|
|
endif
|
|
|
|
LUA_LIB ?= $(SKYNET_ROOT)/3rd/lua/
|
|
LUA_INC ?= $(SKYNET_ROOT)/3rd/lua/
|
|
SKYNET_SRC ?= $(SKYNET_ROOT)/skynet-src
|
|
|
|
SRC = .
|
|
|
|
.PHONY: all clean
|
|
|
|
all: $(TARGET)
|
|
|
|
$(TARGET): $(foreach dir, $(SRC), $(wildcard $(dir)/*.c))
|
|
$(CC) $(CFLAGS) $(SHARED) -I$(LUA_INC) -I$(SKYNET_SRC) $^ -o $@
|
|
|
|
clean:
|
|
rm -f *.o $(TARGET)
|