aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMistivia <i@mistivia.com>2025-07-22 15:28:30 +0800
committerMistivia <i@mistivia.com>2025-07-22 15:28:45 +0800
commit999fcf0f7655c03265c222cc67617f0f510979bf (patch)
treedd51680ffda411239e37460c834a996dc934dc63 /Makefile
parenta8764a20f355fd8fb7b03978d754d1cbd48d0a88 (diff)
change dir structure
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 2 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 3811231..6ae975c 100644
--- a/Makefile
+++ b/Makefile
@@ -9,17 +9,13 @@ else
cflags = -flto -O2
endif
-src = $(shell ls src/*.c)
+src = $(shell ls *.c)
obj = $(src:.c=.o)
tests=$(shell ls tests/*.c)
tests_bin=$(tests:.c=.bin)
all: libalgds.a
- mkdir -p build/lib
- mkdir -p build/include/algds
- cp src/*.h build/include/algds
- cp libalgds.a build/lib/
libalgds.a: $(obj)
ar cr $@ $^
@@ -33,7 +29,7 @@ $(obj):%.o:%.c
$(cc) -c $(cflags) $< -MD -MF $@.d -o $@
$(tests_bin):%.bin:%.c libalgds.a
- $(cc) $(cflags) -Isrc/ $< libalgds.a -MD -MF $@.d -o $@
+ $(cc) $(cflags) -I./ $< libalgds.a -MD -MF $@.d -o $@
clean:
-rm -rf build/