From bf4350b9ad80948d7e79ab64fe5cdff7c10a813a Mon Sep 17 00:00:00 2001 From: Edoardo La Greca Date: Fri, 2 May 2025 17:18:21 +0200 Subject: change makefile targets, add OBJS variable, add comment for platform-dependent object files --- Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index f567c38..3c3dfd1 100644 --- a/Makefile +++ b/Makefile @@ -5,10 +5,15 @@ LDFLAGS = OUTNAME = libfemtokit.a TESTFILE = hello.c -all: clean build - ar -rs $(OUTNAME) *.o +# All object files are listed here +OBJS = + +# Add platform-dependent object files in separate variables (e.g. OBJS_LINUX) +# and then, when running the make file, make sure to concatenate the appropriate +# variable (e.g. OBJS = $(OBJS) $(OBJS_LINUX) ). -build: +all: $(OBJS) + ar -rs $(OUTNAME) *.o clean: -rm test *.o *.a -- cgit v1.2.3