Kconfig: use PARAM for all options.

This commit is contained in:
Serge Vakulenko
2015-09-03 12:08:32 -07:00
parent 23cafa1006
commit fc9d89eff2
4 changed files with 61 additions and 47 deletions

View File

@@ -21,14 +21,14 @@ endif
# sources are located via $S relative to the compilation directory
S = ../..
COPTS = -I. ${IDENT} -DKERNEL
CFLAGS = -O ${COPTS} ${PARAM}
DEFS = -I. ${PARAM} -DKERNEL
CFLAGS = -O ${DEFS}
# compile rules: rules are named COMPILE_${SUFFIX}
# SUFFIX is the file suffix, capitalized (e.g. C for a .c file).
COMPILE_C = ${CC} -c ${CFLAGS} $<
COMPILE_S = ${CC} -c ${COPTS} $<
COMPILE_S = ${CC} -c ${DEFS} $<
%OBJS
@@ -67,23 +67,16 @@ reconfig ioconf.c swapunix.c: Config ../../../tools/kconfig/kconfig
load: unix.elf
pic32prog unix.hex
startup.o: ../startup.S
${COMPILE_S}
# the following are necessary because the files depend on the types of
# cpu's included in the system configuration
clock.o machdep.o conf.o: Makefile
machine:
ln -s .. $@
sys:
ln -s ../../include $@
depend: machine
mkdep ${COPTS} ${CFILES} ioconf.c
startup.o: ../startup.S
${COMPILE_S}
ioconf.o: ioconf.c
${CC} -c ${CFLAGS} ioconf.c
${COMPILE_C}
%RULES

View File

@@ -1,6 +1,32 @@
IDENT=-DCHIPKIT_MAX -DPIC32MX7 -DPWM_ENABLED -DADC_ENABLED -DGPIO_ENABLED -DSD0_CS_PIN=4 -DSD0_CS_PORT=TRISD -DSD0_PORT=2 -DSD0_MHZ=10 -DSPI_ENABLED -DCONSOLE_DEVICE=tty0 -DUART4_ENABLED -DUART3_ENABLED -DUART2_ENABLED -DUART1_ENABLED -DLED_KERNEL_PIN=3 -DLED_KERNEL_PORT=TRISA -DUCB_METER -DEXEC_SCRIPT -DEXEC_ELF -DEXEC_AOUT -DBUS_DIV=1 -DHZ=100 -DBUS_KHZ=80000 -DCPU_KHZ=80000
LDSCRIPT="cfg/bootloader-max32.ld"
PARAM=-DTIMEZONE=480 -DDST=1 -DMAXUSERS=1
PARAM = -DCHIPKIT_MAX
PARAM += -DPIC32MX7
PARAM += -DPWM_ENABLED
PARAM += -DADC_ENABLED
PARAM += -DGPIO_ENABLED
PARAM += -DSD0_CS_PIN=14
PARAM += -DSD0_CS_PORT=TRISC
PARAM += -DSD0_PORT=2
PARAM += -DSD0_MHZ=10
PARAM += -DSPI_ENABLED
PARAM += -DCONSOLE_DEVICE=tty0
PARAM += -DUART4_ENABLED
PARAM += -DUART3_ENABLED
PARAM += -DUART2_ENABLED
PARAM += -DUART1_ENABLED
PARAM += -DLED_KERNEL_PIN=3
PARAM += -DLED_KERNEL_PORT=TRISA
PARAM += -DUCB_METER
PARAM += -DEXEC_SCRIPT
PARAM += -DEXEC_ELF
PARAM += -DEXEC_AOUT
PARAM += -DBUS_DIV=1
PARAM += -DHZ=100
PARAM += -DBUS_KHZ=80000
PARAM += -DCPU_KHZ=80000
PARAM += -DTIMEZONE=480
PARAM += -DDST=1
PARAM += -DMAXUSERS=1
LDSCRIPT = "cfg/bootloader-max32.ld"
#
# Makefile for RetroBSD, pic32 target
#
@@ -24,14 +50,14 @@ endif
# sources are located via $S relative to the compilation directory
S = ../..
COPTS = -I. ${IDENT} -DKERNEL
CFLAGS = -O ${COPTS} ${PARAM}
DEFS = -I. ${PARAM} -DKERNEL
CFLAGS = -O ${DEFS}
# compile rules: rules are named COMPILE_${SUFFIX}
# SUFFIX is the file suffix, capitalized (e.g. C for a .c file).
COMPILE_C = ${CC} -c ${CFLAGS} $<
COMPILE_S = ${CC} -c ${COPTS} $<
COMPILE_S = ${CC} -c ${DEFS} $<
OBJS = exec_aout.o exec_conf.o exec_elf.o exec_script.o exec_subr.o \
init_main.o init_sysent.o kern_clock.o kern_descrip.o \
@@ -114,24 +140,17 @@ reconfig ioconf.c swapunix.c: Config ../../../tools/kconfig/kconfig
load: unix.elf
pic32prog unix.hex
startup.o: ../startup.S
${COMPILE_S}
# the following are necessary because the files depend on the types of
# cpu's included in the system configuration
clock.o machdep.o conf.o: Makefile
machine:
ln -s .. $@
sys:
ln -s ../../include $@
depend: machine
mkdep ${COPTS} ${CFILES} ioconf.c
startup.o: ../startup.S
${COMPILE_S}
ioconf.o: ioconf.c
${CC} -c ${CFLAGS} ioconf.c
${COMPILE_C}
exec_aout.o: $S/kernel/exec_aout.c
${COMPILE_C}