Commit 14d63beb authored by Alessandro Rubini's avatar Alessandro Rubini

build: use obj-y for all object files (Makefile and */*.mk)

CONFIG_DETERMINISTIC_BINARY confirms this makes no difference in
the generated binary.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 1627e3e7
...@@ -14,8 +14,8 @@ SIZE = $(CROSS_COMPILE)size ...@@ -14,8 +14,8 @@ SIZE = $(CROSS_COMPILE)size
PTP_NOPOSIX = ptp-noposix PTP_NOPOSIX = ptp-noposix
objs-y = arch/lm32/crt0.o arch/lm32/irq.o arch/lm32/debug.o obj-y = arch/lm32/crt0.o arch/lm32/irq.o arch/lm32/debug.o
objs-y += wrc_main.o wrc_ptp.o monitor/monitor.o obj-y += wrc_main.o wrc_ptp.o monitor/monitor.o
cflags-y = -include $(CURDIR)/include/generated/autoconf.h \ cflags-y = -include $(CURDIR)/include/generated/autoconf.h \
-Iinclude -I. -Iinclude -I.
...@@ -37,7 +37,7 @@ cflags-$(CONFIG_PTP_NOPOSIX) += \ ...@@ -37,7 +37,7 @@ cflags-$(CONFIG_PTP_NOPOSIX) += \
-I$(PTP_NOPOSIX)/softpll \ -I$(PTP_NOPOSIX)/softpll \
-I$(PTP_NOPOSIX)/PTPWRd -I$(PTP_NOPOSIX)/PTPWRd
objs-$(CONFIG_PTP_NOPOSIX) += $(PTP_NOPOSIX)/PTPWRd/arith.o \ obj-$(CONFIG_PTP_NOPOSIX) += $(PTP_NOPOSIX)/PTPWRd/arith.o \
$(PTP_NOPOSIX)/PTPWRd/bmc.o \ $(PTP_NOPOSIX)/PTPWRd/bmc.o \
$(PTP_NOPOSIX)/PTPWRd/dep/msg.o \ $(PTP_NOPOSIX)/PTPWRd/dep/msg.o \
$(PTP_NOPOSIX)/PTPWRd/dep/net.o \ $(PTP_NOPOSIX)/PTPWRd/dep/net.o \
...@@ -70,9 +70,7 @@ CFLAGS = $(CFLAGS_PLATFORM) $(cflags-y) \ ...@@ -70,9 +70,7 @@ CFLAGS = $(CFLAGS_PLATFORM) $(cflags-y) \
LDFLAGS = $(LDFLAGS_PLATFORM) \ LDFLAGS = $(LDFLAGS_PLATFORM) \
-ffunction-sections -fdata-sections -Wl,--gc-sections -Os -Iinclude -ffunction-sections -fdata-sections -Wl,--gc-sections -Os -Iinclude
OBJS = $(objs-y) \ OBJS = $(obj-y)
$(OBJS_SHELL) $(OBJS_TESTS) $(OBJS_LIB) \
$(OBJS_SOCKITOWM) $(OBJS_SOFTPLL) $(OBJS_DEV)
OUTPUT = wrc OUTPUT = wrc
......
OBJS_DEV = dev/eeprom.o \ obj-y += \
dev/endpoint.o \ dev/eeprom.o \
dev/ep_pfilter.o \ dev/endpoint.o \
dev/i2c.o \ dev/ep_pfilter.o \
dev/minic.o \ dev/i2c.o \
dev/pps_gen.o \ dev/minic.o \
dev/syscon.o \ dev/pps_gen.o \
dev/uart.o \ dev/syscon.o \
dev/sfp.o \ dev/uart.o \
dev/onewire.o \ dev/sfp.o \
dev/sdb.o dev/onewire.o \
dev/sdb.o
OBJS_LIB= lib/mprintf.o \ obj-y += lib/mprintf.o lib/util.o
lib/util.o
ifdef CONFIG_ETHERBONE obj-$(CONFIG_ETHERBONE) += lib/arp.o lib/icmp.o lib/ipv4.o lib/bootp.o
OBJS_LIB += lib/arp.o lib/icmp.o lib/ipv4.o lib/bootp.o
endif
\ No newline at end of file
OBJS_SHELL = shell/shell.o \ obj-y += \
shell/environ.o \ shell/shell.o \
shell/cmd_version.o \ shell/environ.o \
shell/cmd_pll.o \ shell/cmd_version.o \
shell/cmd_sfp.o \ shell/cmd_pll.o \
shell/cmd_stat.o \ shell/cmd_sfp.o \
shell/cmd_ptp.o \ shell/cmd_stat.o \
shell/cmd_mode.o \ shell/cmd_ptp.o \
shell/cmd_calib.o \ shell/cmd_mode.o \
shell/cmd_time.o \ shell/cmd_calib.o \
shell/cmd_gui.o \ shell/cmd_time.o \
shell/cmd_sdb.o \ shell/cmd_gui.o \
shell/cmd_mac.o \ shell/cmd_sdb.o \
shell/cmd_init.o shell/cmd_mac.o \
shell/cmd_init.o
ifdef CONFIG_ETHERBONE obj-$(CONFIG_ETHERBONE) += shell/cmd_ip.o
OBJS_SHELL += shell/cmd_ip.o
endif
OBJS_SOCKITOWM = \ obj-y += \
sockitowm/crcutil.o \ sockitowm/crcutil.o \
sockitowm/eep43.o \ sockitowm/eep43.o \
sockitowm/findtype.o \ sockitowm/findtype.o \
......
OBJS_TESTS = tests/measure_t24p.o obj-y += tests/measure_t24p.o
\ No newline at end of file
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