From 85b47ab8341df72fac08baef7e3cc859587f3761 Mon Sep 17 00:00:00 2001 From: Edoardo La Greca Date: Sun, 4 May 2025 17:36:03 +0200 Subject: improve make file --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 081d769..e9b1d65 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,10 @@ LDFLAGS = OUTNAME = libfemtokit.a TESTFILE = hello.c +# Where the final compilation output is going to be placed. (See Filesystem Hierarchy +# Standard.) +PREFIX = /usr/local/lib + # All object files are listed here: OBJS = $(OBJS_PLATDEP) @@ -23,11 +27,11 @@ clean: -rm test *.o *.a install: all - mv -f $(OUTNAME) /usr/lib + mv -f $(OUTNAME) $(PREFIX) test: all c99 -l libfemtokit.a -o test test/$(TESTFILE) .c.o: - c99 -c $(CFLAGS) -o $@ $< + c99 -c $(CFLAGS) $(LDFLAGS) -o $@ $< -- cgit v1.2.3