old-MTGos-old/kernel/Makefile

22 lines
555 B
Makefile
Raw Normal View History

include ../kernel.settings
SRCS = $(shell find hal/$(arch) -name '*.cpp' -o -name '*.[cS]')
KERNSRCS = $(shell find kernel -name '*.cpp' -o -name '*.c')
OBJS = $(addsuffix .o,$(basename $(SRCS)))
OBJS += $(addsuffix .o,$(basename $(KERNSRCS)))
LD = $(PREFIX)g++
LDFLAGS = -nostdlib -nodefaultlibs -nostdlib -fno-builtin
ifeq ($(arch),x86)
2016-06-16 18:10:07 +00:00
LDFLAGS += -m32 -T kernel-$(arch).ld
endif
all: hal kernel
$(LD) $(LDFLAGS) -o mtgos $(OBJS)
hal:
make -C hal
kernel:
make -C kernel
clean:
make -C hal clean
make -C kernel clean
.PHONY: all hal kernel clean