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.

29 lines
513 B
Makefile

SKYNET_ROOT ?= ../../skynet
include $(SKYNET_ROOT)/platform.mk
PLAT ?= none
TARGET = ../../luaclib/clua.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/
SRC = .
.PHONY: all clean
all: $(TARGET)
$(TARGET): $(foreach dir, $(SRC), $(wildcard $(dir)/*.cpp))
g++ $(CFLAGS) $(SHARED) -I$(LUA_INC) $^ -o $@
clean:
rm -f *.o $(TARGET)