aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohannes Stoelp <johannes.stoelp@gmail.com>2024-09-09 23:08:13 +0200
committerJohannes Stoelp <johannes.stoelp@gmail.com>2024-09-09 23:08:13 +0200
commitf33eb53ef7426ee3a306430738e300bc8043bbab (patch)
treec742502b1fa2675efd0600a4864ef00d157299e1 /Makefile
parentfe0c58e5fbaa37668779ec10d2761e6657b824f4 (diff)
downloadpreload-libbt-f33eb53ef7426ee3a306430738e300bc8043bbab.tar.gz
preload-libbt-f33eb53ef7426ee3a306430738e300bc8043bbab.zip
make: fix flags usage
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index bd97388..be4cf0a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,18 +1,19 @@
all: $(patsubst example/%.c, out/%, $(wildcard example/*.c))
all: $(patsubst example/%.c, run/%, $(wildcard example/*.c))
-CFLAGS := -Wall -Wextra -g -O2
-CFLAGS_recurse2 := -lpthread
+CFLAGS := -Wall -Wextra -g
+CFLAGS_recurse1 := -Wno-infinite-recursion
+CFLAGS_recurse2 := -lpthread -Wno-infinite-recursion
run/%:
LD_PRELOAD=$(PWD)/libbt.so out/$* || test $$? -eq 42 && exit 0
out/%: example/%.c libbt.so
@mkdir -p out
- $(CC) -o $@ $< -rdynamic $(FLAGS) $(CFLAGS_$*)
+ $(CC) -o $@ $< -rdynamic $(CFLAGS) $(CFLAGS_$*)
libbt.so: bt.c
- $(CC) -o $@ $^ -shared -fPIC -static-libgcc -ldl $(FLAGS)
+ $(CC) -o $@ $^ -shared -fPIC -static-libgcc -ldl $(CFLAGS)
clean:
$(RM) -r out