CeDOS - second_stage/makefile

second_stage/makefile (view raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
.RECIPEPREFIX = >

.PHONY: build
build: build/entry.o build/gdt.o
> $(GCC_PREFIX)ld -T link.txt -o $(BUILD_DIR)/second_stage.o --oformat elf32-i386

.PHONY: clear
clear:
> @rm build/*.* 2> /dev/null; true

.PHONY: rebuild
rebuild:
> $(MAKE) clear
> $(MAKE) build

build/entry.o: entry.s
> $(GCC_PREFIX)as -o $@ $<

build/gdt.o: gdt.c gdt.h
> $(GCC_PREFIX)gcc -c -I$(INCLUDE_DIR) --prefix=$(GCC_PREFIX) $(GCC_OPTIONS) -o $@ $<