diff options
| author | amelia squires <[email protected]> | 2024-08-30 03:52:30 -0700 |
|---|---|---|
| committer | amelia squires <[email protected]> | 2024-08-30 03:52:30 -0700 |
| commit | 77431ff603f2271da7f65b0d7784c10ee95d421e (patch) | |
| tree | 3974deaec41ca8c518a991bb6ab4a34f5771cba1 | |
| parent | e0755b477d09240ec2f4246a48a7050c37ef809a (diff) | |
fix windows build
| -rw-r--r-- | makefile | 9 | ||||
| -rw-r--r-- | readme.md | 2 |
2 files changed, 7 insertions, 4 deletions
@@ -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)
@@ -39,7 +39,7 @@ note: any net code is prone to memory leaks, this will be addressed and fixed so build with `make`, output is `./lullaby.so` or (win)`./lullaby.dll`
-windows works through msys2
+windows works through msys2, install `mingw-w64-x86_64-lua` then run `make CC=gcc`
---
|
