aboutsummaryrefslogblamecommitdiff
path: root/lib/Makefile
blob: 5fbbf0b738c467b617a4ac76bf0a7b14e639312e (plain) (tree)























                                                                
# 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