diff options
Diffstat (limited to 'makefile')
| -rw-r--r-- | makefile | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -4,7 +4,7 @@ GIT_COMMIT := "$(shell git describe --tags)-$(shell git describe --always --matc CFLAGS := -fPIC -DGIT_COMMIT='$(GIT_COMMIT)'
LFLAGS := -lm -shared
-LINKER := clang
+LINKER := $(CC)
TARGET := lullaby.so
@@ -12,12 +12,18 @@ SRCS := $(wildcard src/*.c) $(wildcard src/*/*.c) OBJS := $(SRCS:.c=.o)
ifeq ($(OS),Windows_NT)
- LFLAGS += -llua -lws2_32
+ CFLAGS += -I/mingw64/include
+ LFLAGS += -L/mingw64/bin -llua54 -lws2_32
TARGET := $(TARGET:.so=.dll)
+else
+ CFLAGS += -fPIC
endif
all: $(TARGET)
+release: CFLAGS += -O3
+release: all
+
debug: CFLAGS += -g
debug: all
|
