diff options
| author | ame <[email protected]> | 2025-06-16 16:21:46 -0500 |
|---|---|---|
| committer | ame <[email protected]> | 2025-06-16 16:21:46 -0500 |
| commit | 975a4d65e287087404fe7fa4a03bdbe5de4969bc (patch) | |
| tree | 04f09f182fe8c4f9859e77f3a4cdaae9c711ba99 /makefile | |
| parent | 527946cd8b7c6c21e155be66ac00b61a300e60bf (diff) | |
added install targetv0.0.1
Diffstat (limited to 'makefile')
| -rw-r--r-- | makefile | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -1,14 +1,20 @@ CC := clang
-GIT_COMMIT := "$(shell git describe --tags)-$(shell git describe --always --match 'NOT A TAG')"
+GIT_COMMIT := "$(shell git -c safe.directory='*' describe --tags)-$(shell git -c safe.directory='*' describe --always --match 'NOT A TAG')"
-version ?= lua5.4
+version ?= 5.4
+install_version = $(version)
-CFLAGS := -fPIC -DGIT_COMMIT='$(GIT_COMMIT)' `pkg-config --cflags $(version)`
+ifeq ($(version),jit)
+ install_version = 5.1
+endif
+
+CFLAGS := -fPIC -DGIT_COMMIT='$(GIT_COMMIT)' `pkg-config --cflags lua$(version)`
LFLAGS := -lm -shared -lcrypto -lssl
LINKER := $(CC)
TARGET := lullaby.so
+INSTALL_DIR := /usr/lib64/lua/
SRCS := $(wildcard src/*.c) $(wildcard src/*/*.c)
OBJS := $(SRCS:.c=.o)
@@ -26,6 +32,10 @@ all: $(TARGET) release: CFLAGS += -O3
release: all
+install::
+ mkdir $(INSTALL_DIR)$(install_version) -p
+ cp $(TARGET) $(INSTALL_DIR)$(install_version)/$(TARGET)
+
# ok so im pretty sure asan should be linked too, however dlclose needs to be masked anyways
# and since libasan needs to be the first thing to load, you'll have to add it anyways
# run with something like 'LD_PRELOAD="/usr/lib/gcc/x86_64-pc-linux-gnu/14/libasan.so ./fakedlclose.so" lua5.4 ...'
|
