ff8ba97d2a
Further researches are being done
27 lines
675 B
Makefile
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
|