From ef6a411ce8ff615d65e2be105834c2fdbe557de1 Mon Sep 17 00:00:00 2001 From: johannst Date: Sat, 20 Mar 2021 02:34:01 +0100 Subject: Split common headers in header/src files. --- lib/Makefile | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 lib/Makefile (limited to 'lib/Makefile') diff --git a/lib/Makefile b/lib/Makefile new file mode 100644 index 0000000..29c103a --- /dev/null +++ b/lib/Makefile @@ -0,0 +1,25 @@ +# Copyright (c) 2020 Johannes Stoelp + +HDR+=include/auxv.h +HDR+=include/elf.h +HDR+=include/fmt.h +HDR+=include/io.h +HDR+=include/syscall.h + +DEP+=src/io.o +DEP+=src/fmt.o + +libcommon.a: $(HDR) $(DEP) + ar -crs $@ $(filter %.o, $^) + +src/%.o: src/%.c + gcc -c -o $@ \ + -g -O0 \ + -Wall -Wextra \ + -I$(CURDIR)/include \ + -nostdlib \ + $< + +clean: + rm -f $(DEP) + rm -f libcommon.a -- cgit v1.2.3