2015-10-14 18:02:41 +00:00
|
|
|
include ../kernel.settings
|
2016-01-28 18:50:04 +00:00
|
|
|
SRCS = $(shell find hal/$(arch) -name '*.cpp' -o -name '*.[cS]')
|
2016-02-04 11:57:35 +00:00
|
|
|
KERNSRCS = $(shell find kernel -name '*.cpp' -o -name '*.c')
|
2016-06-26 15:14:09 +00:00
|
|
|
#OBJS = $(addsuffix .o,$(basename $(SRCS)))
|
2016-07-23 16:13:26 +00:00
|
|
|
OBJS = $(addsuffix .o,$(basename $(KERNSRCS)))
|
2015-10-14 18:02:41 +00:00
|
|
|
LD = $(PREFIX)g++
|
2016-06-26 15:14:09 +00:00
|
|
|
LDFLAGS = -nostdlib -nodefaultlibs -nostdlib -fno-builtin $(ARCHFLAGS) -T kernel-$(arch).ld -z max-page-size=0x1000
|
2016-06-17 19:39:43 +00:00
|
|
|
|
2016-07-23 16:13:26 +00:00
|
|
|
all: hal kernel #uncomment when done with 3ds
|
2016-06-26 15:14:09 +00:00
|
|
|
$(LD) $(LDFLAGS) -o mtgos $(OBJS) libhal.a -lgcc
|
2015-10-10 12:59:23 +00:00
|
|
|
hal:
|
2016-07-23 16:13:26 +00:00
|
|
|
$(MAKE) -C hal
|
2016-02-04 11:57:35 +00:00
|
|
|
kernel:
|
2016-07-23 16:13:26 +00:00
|
|
|
$(MAKE) -C kernel
|
2015-10-10 12:59:23 +00:00
|
|
|
clean:
|
2016-07-23 16:13:26 +00:00
|
|
|
$(MAKE) -C hal clean
|
|
|
|
$(MAKE) -C kernel clean
|
2015-10-10 12:59:23 +00:00
|
|
|
|
2016-02-04 11:57:35 +00:00
|
|
|
.PHONY: all hal kernel clean
|