From da6877b8be4ecd6a27e076766bf0b6b6f02959cd Mon Sep 17 00:00:00 2001 From: JP Appel Date: Sun, 21 Jul 2024 14:40:09 -0400 Subject: FEAT/DOC: add static target, build/usage instructions --- Makefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'Makefile') 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 $@ $< -- cgit v1.2.3