Pass flags as CFLAGS.
authorSimon 'corecode' Schubert <corecode@fs.ei.tum.de>
Sat, 3 Jan 2009 21:59:48 +0000 (22:59 +0100)
committerSimon Schubert <corecode@dragonflybsd.org>
Tue, 6 Jan 2009 02:57:16 +0000 (03:57 +0100)
sys/boot/pc32/boot2/Makefile
sys/boot/pc32/btx/btx/Makefile
sys/boot/pc32/pxeldr/Makefile

index a6b9bad..b62aea3 100644 (file)
@@ -135,7 +135,7 @@ CLEANFILES+=        boot1$s boot1$s.out boot1$s.o \
 .endfor
 
 sio.o: sio.S
-       ${CC} -DSIOPRT=${BOOT_COMCONSOLE_PORT} -DSIOFMT=${B2SIOFMT} \
+       ${CC} ${CFLAGS} -DSIOPRT=${BOOT_COMCONSOLE_PORT} -DSIOFMT=${B2SIOFMT} \
                -DSIOSPD=${BOOT_COMCONSOLE_SPEED} \
                ${.ALLSRC} -o ${.TARGET} -c
 
index 5edaa39..ab638ff 100644 (file)
@@ -11,14 +11,14 @@ BOOT_BTX_FLAGS=0x1
 BOOT_BTX_FLAGS=0x0
 .endif
 
-AFLAGS+=       -DBTX_FLAGS=${BOOT_BTX_FLAGS}
+CFLAGS+=       -DBTX_FLAGS=${BOOT_BTX_FLAGS}
 
 .if defined(BTX_SERIAL)
 BOOT_COMCONSOLE_PORT?= 0x3f8
 BOOT_COMCONSOLE_SPEED?= 9600
 B2SIOFMT?=     0x3
 
-AFLAGS+=       -DBTX_SERIAL -DSIOPRT=${BOOT_COMCONSOLE_PORT} \
+CFLAGS+=       -DBTX_SERIAL -DSIOPRT=${BOOT_COMCONSOLE_PORT} \
                -DSIOFMT=${B2SIOFMT} -DSIOSPD=${BOOT_COMCONSOLE_SPEED}
 .endif
 
@@ -27,11 +27,11 @@ ORG=        0x9000
 all: btx
 
 btx: btx.o
-       ${LD} -N -e start -Ttext ${ORG} -o btx.out btx.o
+       ${LD} ${LDFLAGS} -N -e start -Ttext ${ORG} -o btx.out btx.o
        objcopy -S -O binary btx.out ${.TARGET}
 
 btx.o: btx.S
-       ${CC} ${CFLAGS} ${AFLAGS} ${.IMPSRC} -o ${.TARGET} -c
+       ${CC} ${CFLAGS} ${.IMPSRC} -o ${.TARGET} -c
 
 CLEANFILES+= btx btx.out btx.o
 
index 70965a8..cd9467d 100644 (file)
@@ -12,18 +12,18 @@ STRIP=
 BINDIR?=       /boot
 
 .if defined(BOOT_PXELDR_PROBE_KEYBOARD)
-AFLAGS+=       -DPROBE_KEYBOARD
+CFLAGS+=       -DPROBE_KEYBOARD
 .endif
 
 .if defined(BOOT_PXELDR_ALWAYS_SERIAL)
-AFLAGS+=       -DALWAYS_SERIAL
+CFLAGS+=       -DALWAYS_SERIAL
 .endif
 
 
 .if exists(${.OBJDIR}/../loader)
-LOADERBIN    ${.OBJDIR}/../loader/loader.bin
+LOADERBIN?=    ${.OBJDIR}/../loader/loader.bin
 .else
-LOADERBIN    ${.CURDIR}/../loader/loader.bin
+LOADERBIN?=    ${.CURDIR}/../loader/loader.bin
 .endif
 
 # BTX components
@@ -50,7 +50,7 @@ ${LDR}: ${LDR}.o
        objcopy -S -O binary ${LDR}.out ${.TARGET}
 
 ${LDR}.o: ${LDR}.S
-       ${CC} ${CFLAGS} ${AFLAGS} ${.IMPSRC} -o ${LDR}.o -c
+       ${CC} ${CFLAGS} ${.IMPSRC} -o ${LDR}.o -c
 
 CLEANFILES+= ${LDR} ${LDR}.out ${LDR}.o ${BOOT}.tmp ${LOADER}