Skip to content
Snippets Groups Projects
Commit b7b4efcd authored by Zachary T Welch's avatar Zachary T Welch
Browse files

makefiles: improve build order

Separates various groups of files to be built in logical succession.
In each layer, the core module (target.c, nand.c, etc.) is built _after_
their helper modules (e.g. image.c, nand_ecc.c) but _before_ any of
their drivers (e.g. arm966e.c, mx3_nand.c).

This allows problems introduced at the bottom of the stack to result
in build failures as soon as possible, as the helpers and core should
wrap portions of them.
parent d796ce0e
No related branches found
No related tags found
No related merge requests found
...@@ -6,65 +6,78 @@ AM_CPPFLAGS = \ ...@@ -6,65 +6,78 @@ AM_CPPFLAGS = \
METASOURCES = AUTO METASOURCES = AUTO
noinst_LTLIBRARIES = libflash.la noinst_LTLIBRARIES = libflash.la
libflash_la_SOURCES = \ libflash_la_SOURCES = \
arm_nandio.c \ $(FLASH_SRCS) \
flash.c \ $(NAND_SRCS) \
lpc2000.c \ mflash.c
lpc288x.c \
lpc2900.c \ FLASH_SRCS = \
cfi.c \ cfi.c \
non_cfi.c \ non_cfi.c \
at91sam7.c \ faux.c \
$(FLASH_DEVICES_SRCS) \
flash.c
FLASH_DEVICES_SRCS = \
aduc702x.c \
at91sam3.c \ at91sam3.c \
davinci_nand.c \ at91sam7.c \
avrf.c \
ecos.c \
lpc2000.c \
lpc288x.c \
lpc2900.c \
ocl.c \
pic32mx.c \
stellaris.c \
stm32x.c \
str7x.c \ str7x.c \
str9x.c \ str9x.c \
aduc702x.c \ str9xpec.c \
nand.c \ tms470.c
NAND_SRCS = \
arm_nandio.c \
nand_ecc.c \ nand_ecc.c \
nand_ecc_kw.c \ nand_ecc_kw.c \
$(NAND_DEVICES_SRCS) \
nand.c
NAND_DEVICES_SRCS = \
davinci_nand.c \
lpc3180_nand_controller.c \ lpc3180_nand_controller.c \
stellaris.c \ mx3_nand.c \
str9xpec.c \
stm32x.c \
tms470.c \
ecos.c \
orion_nand.c \ orion_nand.c \
s3c24xx_nand.c \ s3c24xx_nand.c \
s3c2410_nand.c \ s3c2410_nand.c \
s3c2412_nand.c \ s3c2412_nand.c \
s3c2440_nand.c \ s3c2440_nand.c \
s3c2443_nand.c \ s3c2443_nand.c
ocl.c \
mflash.c \
pic32mx.c \
avrf.c \
faux.c \
mx3_nand.c
noinst_HEADERS = \ noinst_HEADERS = \
arm_nandio.h \ arm_nandio.h \
at91sam7.h \
at91sam3.h \
avrf.h \
cfi.h \
flash.h \ flash.h \
lpc2000.h \ lpc2000.h \
lpc288x.h \ lpc288x.h \
lpc2900.h \ lpc2900.h \
cfi.h \ lpc3180_nand_controller.h \
mflash.h \
mx3_nand.h \
non_cfi.h \ non_cfi.h \
at91sam7.h \
at91sam3.h \
str7x.h \
str9x.h \
nand.h \ nand.h \
lpc3180_nand_controller.h \ ocl.h \
pic32mx.h \
stellaris.h \ stellaris.h \
str9xpec.h \
stm32x.h \ stm32x.h \
str7x.h \
str9x.h \
str9xpec.h \
tms470.h \ tms470.h \
s3c24xx_nand.h \ s3c24xx_nand.h \
s3c24xx_regs_nand.h \ s3c24xx_regs_nand.h
mflash.h \
ocl.h \
pic32mx.h \
avrf.h \
mx3_nand.h
MAINTAINERCLEANFILES = $(srcdir)/Makefile.in MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
...@@ -25,90 +25,115 @@ $(DEBUG_HEADER): $(BIN2C) $(DEBUG_HANDLER) ...@@ -25,90 +25,115 @@ $(DEBUG_HEADER): $(BIN2C) $(DEBUG_HANDLER)
METASOURCES = AUTO METASOURCES = AUTO
noinst_LTLIBRARIES = libtarget.la noinst_LTLIBRARIES = libtarget.la
libtarget_la_SOURCES = \ libtarget_la_SOURCES = \
target.c \ $(TARGET_CORE_SRC) \
$(ARM_DEBUG_SRC) \
$(ARMV4_5_SRC) \
$(ARMV6_SRC) \
$(ARMV7_SRC) \
$(ARM_MISC_SRC) \
$(MIPS32_SRC) \
avrt.c
TARGET_CORE_SRC = \
algorithm.c \
register.c \ register.c \
image.c \
breakpoints.c \ breakpoints.c \
target.c \
target_request.c
ARMV4_5_SRC = \
armv4_5.c \ armv4_5.c \
embeddedice.c \ armv4_5_mmu.c \
etm.c \ armv4_5_cache.c \
$(ARM7_9_SRC)
ARM7_9_SRC = \
arm7_9_common.c \
arm7tdmi.c \ arm7tdmi.c \
arm720t.c \
arm9tdmi.c \ arm9tdmi.c \
arm_jtag.c \
arm7_9_common.c \
algorithm.c \
arm920t.c \ arm920t.c \
arm720t.c \
armv4_5_mmu.c \
armv4_5_cache.c \
arm_disassembler.c \
arm966e.c \ arm966e.c \
arm926ejs.c \ arm926ejs.c
ARM_MISC_SRC = \
fa526.c \ fa526.c \
feroceon.c \ feroceon.c \
etb.c \ xscale.c
xscale.c \
arm_simulator.c \ ARMV6_SRC = \
image.c \ arm11.c \
arm11_dbgtap.c
ARMV7_SRC = \
armv7m.c \ armv7m.c \
armv7a.c \
cortex_m3.c \ cortex_m3.c \
cortex_a8.c \ armv7a.c \
cortex_a8.c
ARM_DEBUG_SRC = \
arm_jtag.c \
arm_disassembler.c \
arm_simulator.c \
arm_adi_v5.c \ arm_adi_v5.c \
etm_dummy.c \ embeddedice.c \
$(OOCD_TRACE_FILES) \
target_request.c \
trace.c \ trace.c \
arm11.c \ etb.c \
arm11_dbgtap.c \ etm.c \
$(OOCD_TRACE_FILES) \
etm_dummy.c
MIPS32_SRC = \
mips32.c \ mips32.c \
mips_m4k.c \ mips_m4k.c \
mips32_pracc.c \ mips32_pracc.c \
mips32_dmaacc.c \ mips32_dmaacc.c \
mips_ejtag.c \ mips_ejtag.c
avrt.c
noinst_HEADERS = \ noinst_HEADERS = \
target.h \ algorithm.h \
target_type.h \
trace.h \
register.h \
armv4_5.h \
embeddedice.h \
etm.h \
arm7tdmi.h \
arm9tdmi.h \
arm_jtag.h \ arm_jtag.h \
arm_adi_v5.h \
arm_disassembler.h \
arm_simulator.h \
arm7_9_common.h \ arm7_9_common.h \
arm920t.h \ arm7tdmi.h \
arm720t.h \ arm720t.h \
arm9tdmi.h \
arm920t.h \
arm926ejs.h \
arm966e.h \
arm11.h \
armv4_5.h \
armv4_5_mmu.h \ armv4_5_mmu.h \
armv4_5_cache.h \ armv4_5_cache.h \
breakpoints.h \
algorithm.h \
arm_disassembler.h \
arm966e.h \
arm926ejs.h \
etb.h \
xscale.h \
xscale_debug.h \
arm_simulator.h \
image.h \
armv7m.h \
armv7a.h \ armv7a.h \
armv7m.h \
avrt.h \
breakpoints.h \
cortex_m3.h \ cortex_m3.h \
cortex_a8.h \ cortex_a8.h \
arm_adi_v5.h \ embeddedice.h \
etb.h \
etm.h \
etm_dummy.h \ etm_dummy.h \
oocd_trace.h \ image.h \
target_request.h \
trace.h \
arm11.h \
mips32.h \ mips32.h \
mips_m4k.h \ mips_m4k.h \
mips_ejtag.h \ mips_ejtag.h \
mips32_pracc.h \ mips32_pracc.h \
mips32_dmaacc.h \ mips32_dmaacc.h \
avrt.h oocd_trace.h \
register.h \
target.h \
target_type.h \
trace.h \
target_request.h \
trace.h \
xscale.h \
xscale_debug.h
nobase_dist_pkglib_DATA = nobase_dist_pkglib_DATA =
nobase_dist_pkglib_DATA += ecos/at91eb40a.elf nobase_dist_pkglib_DATA += ecos/at91eb40a.elf
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment