From 77431ff603f2271da7f65b0d7784c10ee95d421e Mon Sep 17 00:00:00 2001 From: amelia squires Date: Fri, 30 Aug 2024 03:52:30 -0700 Subject: fix windows build --- makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'makefile') diff --git a/makefile b/makefile index 72e3243..5ceec4b 100644 --- a/makefile +++ b/makefile @@ -2,9 +2,9 @@ CC := clang GIT_COMMIT := "$(shell git describe --tags)-$(shell git describe --always --match 'NOT A TAG')" -CFLAGS := -fPIC -DGIT_COMMIT='$(GIT_COMMIT)' -Wall +CFLAGS := -DGIT_COMMIT='$(GIT_COMMIT)' -Wall LFLAGS := -lm -shared -LINKER := clang +LINKER := $(CC) TARGET := lullaby.so @@ -12,8 +12,11 @@ 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) -- cgit v1.2.3