summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdoardo La Greca2025-05-04 17:36:03 +0200
committerEdoardo La Greca2025-05-04 17:36:03 +0200
commit85b47ab8341df72fac08baef7e3cc859587f3761 (patch)
tree340d66d09af58912d54f0c93d910f37ae35cb3ab
parentcb7efe989f0a51d470f72360036a5ec67a358f88 (diff)
improve make file
-rw-r--r--Makefile8
1 files 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 $@ $<