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 | 7018bae05d9c04c799e715294b5c58317f21a5ac (patch) | |
| tree | 6ebfb5bcd5d0eb528804f27702c921e15a407024 /makefile | |
| parent | ac965cf5e65a120134e5fe15be637a71ecd9ff60 (diff) | |
make file (woo)
Diffstat (limited to 'makefile')
| -rw-r--r-- | makefile | 22 |
1 files changed, 22 insertions, 0 deletions
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) |
