diff options
| author | ame <[email protected]> | 2024-04-14 21:24:32 -0500 |
|---|---|---|
| committer | ame <[email protected]> | 2024-04-14 21:24:32 -0500 |
| commit | 3b9343ae3f25684e1dfa3bd8f123d61dcfd81be7 (patch) | |
| tree | 6ebfb5bcd5d0eb528804f27702c921e15a407024 | |
| parent | 6b4d88d79c8000a6c3a50aaadbab0c7f4b6e7525 (diff) | |
make file (woo)
| -rw-r--r-- | .gitignore | 3 | ||||
| -rw-r--r-- | makefile | 22 |
2 files changed, 25 insertions, 0 deletions
@@ -8,3 +8,6 @@ a.out test test2 *.py + +src/*.o +src/*/*.o diff --git a/makefile b/makefile new file mode 100644 index 0000000..f27930a --- /dev/null +++ b/makefile @@ -0,0 +1,22 @@ +#todo: msys2 stuff + +CC := clang +CFLAGS := -fPIC +LFLAGS := -lm -shared + +SRCS := $(wildcard src/*.c) $(wildcard src/*/*.c) + +OBJS := $(SRCS:.c=.o) + +TARGET := llib.so + +all: $(TARGET) + +%.o: %.c + $(CC) -c $< -o $@ $(CFLAGS) + +$(TARGET): $(OBJS) + ld $(LFLAGS) $(OBJS) -o $(TARGET) + +clean: + rm -f $(OBJS) |
