forward compiler and linker flags to the subdirectory examples
This commit is contained in:
parent
66b31bfa45
commit
09e637f719
1 changed files with 10 additions and 9 deletions
|
@ -1,5 +1,14 @@
|
|||
TOPDIR = $(shell pwd)
|
||||
ARCH = x86
|
||||
|
||||
ifeq ($(ARCH),x86)
|
||||
TARGET=i586-metalsvm-elf32
|
||||
endif
|
||||
ifeq ($(ARCH),x86_64)
|
||||
TARGET=x86_64-metalsvm-elf64
|
||||
endif
|
||||
|
||||
NEWLIB = $(TOPDIR)/$(ARCH)/$(TARGET)
|
||||
RM = rm -rf
|
||||
CD = cd
|
||||
MKDIR = mkdir
|
||||
|
@ -22,17 +31,9 @@ export CXXFLAGS=$(CFLAGS)
|
|||
export CPPFLAGS=$(CFLAGS)
|
||||
export NASMFLAGS
|
||||
|
||||
ifeq ($(ARCH),x86)
|
||||
TARGET=i586-metalsvm-elf32
|
||||
endif
|
||||
ifeq ($(ARCH),x86_64)
|
||||
TARGET=x86_64-metalsvm-elf64
|
||||
endif
|
||||
|
||||
|
||||
default: $(ARCH)
|
||||
$(MAKE) -C examples depend
|
||||
$(MAKE) -C examples
|
||||
$(MAKE) CFLAGS+="-nostdinc -Wall -fno-builtin -I$(NEWLIB)/include -I../../include -I../../arch/$(ARCH)/include" LDFLAGS="-nostdlib -L$(NEWLIB)/lib" -C examples
|
||||
|
||||
$(ARCH):
|
||||
$(RM) $(TMP)
|
||||
|
|
Loading…
Add table
Reference in a new issue