diff options
Diffstat (limited to 'sys/arch/gumstix/conf')
-rw-r--r-- | sys/arch/gumstix/conf/Makefile.gumstix | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/sys/arch/gumstix/conf/Makefile.gumstix b/sys/arch/gumstix/conf/Makefile.gumstix index d8611f2e17d..4f003b413c3 100644 --- a/sys/arch/gumstix/conf/Makefile.gumstix +++ b/sys/arch/gumstix/conf/Makefile.gumstix @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.gumstix,v 1.5 2010/04/26 18:58:30 deraadt Exp $ +# $OpenBSD: Makefile.gumstix,v 1.6 2010/04/26 20:50:16 deraadt Exp $ # This makefile is constructed from a machine description: # config machineid @@ -29,7 +29,13 @@ STRIP?= strip .ifndef S S!= cd ../../../..; pwd .endif -THISARM= $S/arch/gumstix + +_mach?= gumstix +_machdir?= $S/arch/gumstix +_arch?= arm +_archdir?= $S/arch/arm + +_machdir= $S/arch/gumstix ARM= $S/arch/arm INCLUDES= -nostdinc -I. -I$S -I$S/arch @@ -49,7 +55,7 @@ COPTS?= -O2 CFLAGS= ${DEBUG} ${CDIAGFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE} AFLAGS= -x assembler-with-cpp -D_LOCORE ${CMACHFLAGS} #LINKFLAGS= -Ttext 0xF0000020 -e start --warn-common -#LINKFLAGS= -T ${THISARM}/conf/kern.ldscript +#LINKFLAGS= -T ${_machdir}/conf/kern.ldscript LINKFLAGS= -T ldscript LINKFLAGS+= --warn-common STRIPFLAGS= -g -X -x @@ -92,11 +98,11 @@ HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $< # ${SYSTEM_LD_HEAD} # ${SYSTEM_LD} swapxxx.o # ${SYSTEM_LD_TAIL} -SYSTEM_OBJ= ${BOARDTYPE}_start.o locore.o param.o ioconf.o ${OBJS} +SYSTEM_OBJ= ${_mach}_start.o locore.o param.o ioconf.o ${OBJS} SYSTEM_DEP= Makefile ${SYSTEM_OBJ} SYSTEM_LD_HEAD= rm -f $@ SYSTEM_LD_HEAD+=; \ - cat ${ARM}/conf/ldscript.head ${ARM}/conf/ldscript.tail | \ + cat ${_archdir}/conf/ldscript.head ${_archdir}/conf/ldscript.tail | \ sed -e 's/@KERNEL_BASE_PHYS@/${KERNEL_BASE_PHYS}/' \ -e 's/@KERNEL_BASE_VIRT@/${KERNEL_BASE_VIRT}/' \ > ldscript @@ -118,8 +124,8 @@ LINKFLAGS+= -x %LOAD -assym.h: $S/kern/genassym.sh ${ARM}/arm/genassym.cf Makefile - cat ${ARM}/arm/genassym.cf | \ +assym.h: $S/kern/genassym.sh ${_archdir}/arm/genassym.cf Makefile + cat ${_archdir}/arm/genassym.cf | \ sh $S/kern/genassym.sh ${CC} ${CFLAGS} \ ${CPPFLAGS} ${PARAM} > assym.h.tmp && \ mv -f assym.h.tmp assym.h @@ -162,16 +168,16 @@ links: sed 's,.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks sh makelinks && rm -f dontlink makelinks -SRCS= ${ARM}/arm/locore.S \ +SRCS= ${_archdir}/arm/locore.S \ param.c ioconf.c ${CFILES} ${SFILES} depend:: .depend .depend: ${SRCS} assym.h param.c ${APMINC} ${DB_STRUCTINFO} - ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${ARM}/arm/locore.S + ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${_archdir}/arm/locore.S ${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES} .if ${SFILES} != "" ${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES} .endif - cat ${ARM}/arm/genassym.cf | \ + cat ${_archdir}/arm/genassym.cf | \ sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \ ${CPPFLAGS} @sed -e 's/.*\.o: /assym.h: /' -e 's/\/tmp\/genassym_c.[^ ]*//' \ @@ -200,10 +206,10 @@ machdep.o: Makefile # depend on CPU configuration locore.o machdep.o: Makefile -${BOARDTYPE}_start.o: ${THISARM}/gumstix/${BOARDTYPE}_start.S assym.h +${_mach}_start.o: ${_machdir}/gumstix/${_mach}_start.S assym.h ${NORMAL_S} -locore.o: ${ARM}/arm/locore.S assym.h +locore.o: ${_archdir}/arm/locore.S assym.h ${NORMAL_S} |