add rules for the automatic creation of include/eduos/config.inc

This commit is contained in:
Stefan Lankes 2013-11-27 22:43:15 +01:00
parent ed27254338
commit 1285a8c4fe
2 changed files with 9 additions and 2 deletions

2
.gitignore vendored
View file

@ -4,4 +4,6 @@
*.elf
*.sym
Makefile
documentation/html/
include/eduos/config.h
include/eduos/config.inc

View file

@ -22,7 +22,7 @@ STRIP_FOR_TARGET = $(CROSSCOMPREFIX)strip
READELF_FOR_TARGET = $(CROSSCOMPREFIX)readelf
NASM = nasm
NASMFLAGS = -felf32 -g
NASMFLAGS = -felf32 -g -i$(TOPDIR)/include/eduos/
INCLUDE = -I$(TOPDIR)/include -I$(TOPDIR)/arch/$(ARCH)/include
# Compiler options for final code
CFLAGS = -g -m32 -march=i586 -Wall -O2 -fno-builtin -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc $(INCLUDE) -fno-stack-protector
@ -77,7 +77,12 @@ doc:
@echo [DEP] $*.dep
$Q$(CC_FOR_TARGET) -MF $*.dep -MT $*.o -MM $(CFLAGS) $<
%.o : %.asm
include/eduos/config.inc: include/eduos/config.h
@echo "; This file is generated automatically from the config.h file." > include/eduos/config.inc
@echo "; Before editing this, you should consider editing config.h." >> include/eduos/config.inc
@awk '/^#define KERNEL_STACK_SIZE/{ print "%define KERNEL_STACK_SIZE", $$3 }' include/eduos/config.h >> include/eduos/config.inc
%.o : %.asm include/eduos/config.inc
@echo [ASM] $@
$Q$(NASM) $(NASMFLAGS) -o $@ $<