old-MTGos-old/kernel/hal/x86/Makefile
Morten Delenk ff8ba97d2a Added a keyboard driver and somehow broke the kernel.
Further researches are being done
2015-10-13 16:11:06 +02:00

27 lines
675 B
Makefile

SRCS = $(shell find -name '*.cpp' -o -name '*.[cS]')
OBJS = $(addsuffix .o,$(basename $(SRCS)))
CPP = g++
CC = gcc
ASFLAGS = -m32
CFLAGS = -m32 -Wall -fno-stack-protector -nostdinc -Ic_include/ -ffreestanding -march=native -std=c11 -fno-builtin -Werror -nostdlib
CPPFLAGS = -m32 -Wall -fno-stack-protector -nostdinc -std=c++14 -Iinclude/ -Ic_include/ -fno-rtti -fno-exceptions -ffreestanding -march=native -fno-builtin -Werror -nostdlib
LDFLAGS = -r -melf_i386
include ../../../kernel.settings
all: $(OBJS)
%.o: %.cpp
$(CPP) $(CPPFLAGS) -c -o $@ $^
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $^
%.o: $.S
$(CC) $(CFLAGS) -c -o $@ $^
clean:
rm -rf $(OBJS)
.PHONY: clean all