Commit 3bb5f9df authored by Alessandro Rubini's avatar Alessandro Rubini

Makefile: use .config and include/config/autoconf.h

This has been verified to properly obey the new CONFIG_ETHERBONE
settin.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 92a9048e
# choose your board here. # choose your board here.
BOARD = spec BOARD = spec
# Uncomment to enable Etherbone support (will soon be a Kconfig variable)
# CONFIG_ETHERBONE=y
# and don't touch the rest unless you know what you're doing. # and don't touch the rest unless you know what you're doing.
CROSS_COMPILE ?= lm32-elf- CROSS_COMPILE ?= lm32-elf-
...@@ -13,6 +9,8 @@ OBJDUMP = $(CROSS_COMPILE)objdump ...@@ -13,6 +9,8 @@ OBJDUMP = $(CROSS_COMPILE)objdump
OBJCOPY = $(CROSS_COMPILE)objcopy OBJCOPY = $(CROSS_COMPILE)objcopy
SIZE = $(CROSS_COMPILE)size SIZE = $(CROSS_COMPILE)size
-include $(CURDIR)/.config
OBJS_WRC = wrc_main.o \ OBJS_WRC = wrc_main.o \
wrc_ptp.o \ wrc_ptp.o \
monitor/monitor.o monitor/monitor.o
...@@ -24,10 +22,7 @@ INCLUDE_DIRS = -I$(PTP_NOPOSIX)/wrsw_hal \ ...@@ -24,10 +22,7 @@ INCLUDE_DIRS = -I$(PTP_NOPOSIX)/wrsw_hal \
-I$(PTP_NOPOSIX)/softpll \ -I$(PTP_NOPOSIX)/softpll \
-Iinclude -Iinclude
# Will soon be managed by Kconfig CFLAGS = -include $(CURDIR)/include/generated/autoconf.h
ifdef CONFIG_ETHERBONE
CFLAGS_EB = -DCONFIG_ETHERBONE=1
endif
CFLAGS_PTPD = -ffreestanding \ CFLAGS_PTPD = -ffreestanding \
-DPTPD_FREESTANDING \ -DPTPD_FREESTANDING \
...@@ -69,7 +64,7 @@ include sockitowm/sockitowm.mk ...@@ -69,7 +64,7 @@ include sockitowm/sockitowm.mk
include dev/dev.mk include dev/dev.mk
CFLAGS = $(CFLAGS_PLATFORM) $(CFLAGS_EB) $(CFLAGS_PTPD) $(INCLUDE_DIRS) \ CFLAGS += $(CFLAGS_PLATFORM) $(CFLAGS_EB) $(CFLAGS_PTPD) $(INCLUDE_DIRS) \
-ffunction-sections -fdata-sections -Os -Iinclude \ -ffunction-sections -fdata-sections -Os -Iinclude \
-include include/trace.h \ -include include/trace.h \
$(PTPD_CFLAGS) -I$(PTP_NOPOSIX)/PTPWRd -I. -Isoftpll $(PTPD_CFLAGS) -I$(PTP_NOPOSIX)/PTPWRd -I. -Isoftpll
...@@ -121,3 +116,5 @@ silentoldconfig: ...@@ -121,3 +116,5 @@ silentoldconfig:
scripts_basic config %config: scripts_basic config %config:
$(MAKE) -f Makefile.kconfig $@ $(MAKE) -f Makefile.kconfig $@
.config: silentoldconfig
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment