From 9ff82723e360761e94917c6d15d070dd3534ea2a Mon Sep 17 00:00:00 2001 From: johannst Date: Sat, 26 Sep 2020 22:21:40 +0200 Subject: split makefiles --- lib/Makefile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 lib/Makefile (limited to 'lib') diff --git a/lib/Makefile b/lib/Makefile new file mode 100644 index 0000000..5fbbf0b --- /dev/null +++ b/lib/Makefile @@ -0,0 +1,24 @@ +# Copyright (c) 2020 Johannes Stoelp + +AS := gcc +ASFLAGS := -g -O0 +CXX := g++ +CXXFLAGS := -g -O0 -Wall -Wextra -I. +AR := ar + +ARCH := x86_64 + +libmatcha.a: compile_guard.o thread.o executor.o \ + thread.h executor.h \ + arch/$(ARCH)/thread_create.o arch/$(ARCH)/yield.o \ + arch/$(ARCH)/asm.h + $(AR) rcs $@ $(filter %.o,$^) + +%.o: %.cc + $(CXX) -c -o $@ $^ $(CXXFLAGS) + +%.o: %.s + $(AS) -c -o $@ $^ $(ASFLAGS) + +clean: + rm -f *.o **/*.o libmatcha.a -- cgit v1.2.3