aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorJP Appel <jeanpierre.appel01@gmail.com>2024-07-21 14:40:09 -0400
committerJP Appel <jeanpierre.appel01@gmail.com>2024-07-21 14:40:09 -0400
commitda6877b8be4ecd6a27e076766bf0b6b6f02959cd (patch)
treec8ca7352955289c96239255a99774967a3f1e9be /Makefile
parentdb97c4a08b5dfa1c20e7239e9aa4226f0f0235fe (diff)
FEAT/DOC: add static target, build/usage instructions
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 8 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 699ddef..c0624ae 100644
--- a/Makefile
+++ b/Makefile
@@ -1,19 +1,23 @@
CC := gcc
CFLAGS := -Wall
+DEBUG_FLAGS := -ggdb -Og
SRCS := eztester.c
OBJS := eztester.o eztester_debug.o
STATIC_LIBS := libeztester.a libeztester_debug.a
+DYNAMIC_LIBS := libeztester.a libeztester_debug.a
-.PHONY: all clean
+.PHONY: all static clean
all: $(STATIC_LIBS)
-eztester.o: eztester.c
+static: $(STATIC_LIBS)
+
+%.o: %.c
$(CC) -c $(CFLAGS) -O3 -o $@ $<
-eztester_debug.o: eztester.c
- $(CC) -c -ggdb -Og $(CFLAGS) -o $@ $<
+%_debug.o: %.c
+ $(CC) -c $(DEBUG_FLAGS) $(CFLAGS) -o $@ $<
lib%.a: %.o
ar rcs $@ $<