Permalink
Browse files

Move the common compiler configuration to Makefile.inc in the root

  • Loading branch information...
1 parent 05c0f99 commit 32b92c1b5ce8059ee87214223e825f7c0c8001df @zxombie committed Nov 28, 2012
Showing with 11 additions and 9 deletions.
  1. +6 −0 Makefile.inc
  2. +3 −5 boot-wrapper-aarch64/Makefile
  3. +2 −4 kernel/Makefile
View
@@ -0,0 +1,6 @@
+
+CROSS_COMPILE ?= ${ROOT_DIR}/toolchain/build/bin/aarch64-none-freebsd10-
+CC = $(CROSS_COMPILE)gcc
+LD = $(CROSS_COMPILE)ld
+OBJCOPY = ${CROSS_COMPILE}objcopy
+
@@ -6,6 +6,9 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE.txt file.
+ROOT_DIR=${.CURDIR}/..
+include ${ROOT_DIR}/Makefile.inc
+
# VE
PHYS_OFFSET = 0x80000000
UART_BASE = 0x1c090000
@@ -23,11 +26,6 @@ KERNEL_OFFSET = 0x80000
LD_SCRIPT = model.lds.S
IMAGE = linux-system.axf
-CROSS_COMPILE ?=/mnt/aturner/freebsd/armv8/build/bin/aarch64-none-freebsd10-
-CC = $(CROSS_COMPILE)gcc
-LD = $(CROSS_COMPILE)ld
-DTC = $(if $(wildcard ./dtc), ./dtc, $(shell which dtc))
-
all: $(IMAGE)
clean:
View
@@ -1,8 +1,6 @@
-CROSS_COMPILER?=/mnt/aturner/freebsd/armv8/build/bin/aarch64-none-freebsd10-
-CC=${CROSS_COMPILER}gcc
-LD=${CROSS_COMPILER}ld
-OBJCOPY=${CROSS_COMPILER}objcopy
+ROOT_DIR=${.CURDIR}/..
+include ${ROOT_DIR}/Makefile.inc
LOADER_OBJECTS=linux_start.o
OBJECTS=locore.o test.o

0 comments on commit 32b92c1

Please sign in to comment.