diff options
| -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) |
