diff --git a/Makefile b/Makefile index 518dd8e..3540d20 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,12 @@ PREFIX := . CP := cp -f +CFLAGS := -std=c89 -Wall -Wextra -Wpedantic -Wshadow -Wundef +CPPFLAGS := -D_FORTIFY_SOURCE=2 + +export CFLAGS +export CPPFLAGS + all: plug/libplug.so src/plugin plug/libplug.so: diff --git a/plug/Makefile b/plug/Makefile index 6c827ae..999a1dc 100644 --- a/plug/Makefile +++ b/plug/Makefile @@ -1,5 +1,3 @@ -include ../root.mk - CFLAGS += -shared -fPIE libplug.so: plug.o diff --git a/root.mk b/root.mk deleted file mode 100644 index 1c92c3f..0000000 --- a/root.mk +++ /dev/null @@ -1,6 +0,0 @@ -CFLAGS := -std=c89 -Wall -Wextra -Wpedantic -Wshadow -Wundef -CPPFLAGS := -D_FORTIFY_SOURCE=2 -LDLIBS := -lplug - -.c.o: - ${COMPILE.c} $< -o $@ diff --git a/src/Makefile b/src/Makefile index 72d7624..43c9359 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,5 +1,3 @@ -include ../root.mk - CPPFLAGS += -I../plug -L../plug plugin: main.o