From e930cc6bdc7f62befac063d7d9d016ffb0a64f1a Mon Sep 17 00:00:00 2001 From: David Moc Date: Sat, 30 May 2026 21:53:05 +0200 Subject: Added the old repo, refactored it, added the C jit. --- Makefile | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1b15d60 --- /dev/null +++ b/Makefile @@ -0,0 +1,31 @@ +CC = clang + +STATIC_LIB = include/libccdjit.a +SHARED_LIB = include/libccdjit.so + +SRC = src/main.c src/app.c src/render.c src/font.c src/util.c src/buffers.c src/ecex.c src/config.c src/eval.c +BIN = bin/ecex + +PKG_CFLAGS = $(shell pkg-config --cflags glfw3) +PKG_LIBS = $(shell pkg-config --libs glfw3) + +CFLAGS = -std=c11 -Wall -Wextra -pedantic -Iinclude $(PKG_CFLAGS) +LDLIBS = $(PKG_LIBS) -lGL -lm + +.PHONY: all static shared clean run + +all: static + +static: $(SRC) $(STATIC_LIB) + @mkdir -p bin + $(CC) $(CFLAGS) $(SRC) $(STATIC_LIB) -o $(BIN) $(LDLIBS) + +shared: $(SRC) $(SHARED_LIB) + @mkdir -p bin + $(CC) $(CFLAGS) $(SRC) -Linclude -lccdjit -o $(BIN) $(LDLIBS) + +run: static + LD_LIBRARY_PATH=include ./$(BIN) + +clean: + rm -f $(BIN) -- cgit v1.2.3