diff options
author | Josh Blum <josh@joshknows.com> | 2010-02-11 20:24:01 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-02-11 20:24:01 -0800 |
commit | 350f5c5decca20a54132867283448fd32226bbc2 (patch) | |
tree | 261ec83435d3625ea307e21813ea814113278b79 /firmware/microblaze/Makefile.common | |
parent | 6c7d9f1f7573fc73522499573560bf1aef64f414 (diff) | |
download | uhd-350f5c5decca20a54132867283448fd32226bbc2.tar.gz uhd-350f5c5decca20a54132867283448fd32226bbc2.tar.bz2 uhd-350f5c5decca20a54132867283448fd32226bbc2.zip |
Getting hello packets from the usrp2 with ip and mac addrs.
Cleaned up the mb build system a bit.
Diffstat (limited to 'firmware/microblaze/Makefile.common')
-rw-r--r-- | firmware/microblaze/Makefile.common | 70 |
1 files changed, 39 insertions, 31 deletions
diff --git a/firmware/microblaze/Makefile.common b/firmware/microblaze/Makefile.common index cb09f7f9d..3d0f540d8 100644 --- a/firmware/microblaze/Makefile.common +++ b/firmware/microblaze/Makefile.common @@ -17,6 +17,9 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # +######################################################################## +# lwIP header include dirs +######################################################################## LWIPDIR = $(top_srcdir)/lwip/lwip-1.3.1 LWIP_INCLUDES = \ @@ -25,50 +28,55 @@ LWIP_INCLUDES = \ -I$(LWIPDIR)/src/include \ -I$(LWIPDIR)/src/include/ipv4 -STD_INCLUDES = \ +######################################################################## +# local include dirs +######################################################################## +LOCAL_INCLUDES = \ -I$(top_srcdir)/include \ - -I$(top_srcdir)/lib \ - -I$(top_srcdir)/../../lib/usrp/mboard \ - $(LWIP_INCLUDES) + -I$(top_srcdir)/lib -#HAL_IO = -DHAL_IO_USES_DBOARD_PINS -HAL_IO = -DHAL_IO_USES_UART - -AM_CPPFLAGS = $(HAL_IO) $(STD_INCLUDES) +######################################################################## +# misc flags for the mb-gcc compiler +######################################################################## +MBGCC_CFLAGS = \ + --std=gnu99 -Wall -Werror-implicit-function-declaration \ + -mxl-soft-div -msoft-float -mxl-soft-mul -mxl-barrel-shift -STD_CFLAGS = --std=gnu99 -Wall -Werror-implicit-function-declaration -mxl-soft-div -msoft-float +MBGCC_LFLAGS = -Wl,-defsym -Wl,_STACK_SIZE=3072 -MB_CFLAGS = -mxl-soft-mul -mxl-barrel-shift - -AM_CFLAGS = $(STD_CFLAGS) $(MB_CFLAGS) -#AM_CFLAGS = $(STD_CFLAGS) -mxl-soft-mul -mxl-barrel-shift -mxl-gp-opt -G 16384 +######################################################################## +# define for the hal io (FIXME move?) +######################################################################## +#HAL_IO = -DHAL_IO_USES_DBOARD_PINS +HAL_IO = -DHAL_IO_USES_UART +######################################################################## +# set the cflags and ldflags +######################################################################## +AM_CFLAGS = $(MBGCC_CFLAGS) $(LOCAL_INCLUDES) $(LWIP_INCLUDES) $(HAL_IO) -#LINKER_SCRIPT = $(top_srcdir)/lib/microblaze.ld -#AM_LDFLAGS = -Wl,-T,$(LINKER_SCRIPT) -Wl,-defsym -Wl,_STACK_SIZE=1024 -#AM_LDFLAGS = -Wl,-T,$(LINKER_SCRIPT) -Wl,-Map -Wl,$@.map -#AM_LDFLAGS = -Wl,-T,$(LINKER_SCRIPT) -AM_LDFLAGS = -Wl,-Map -Wl,$(@:.elf=.map) -Wl,-defsym -Wl,_STACK_SIZE=3072 -#AM_LDFLAGS = -Wl,-defsym -Wl,_STACK_SIZE=2048 +AM_LDFLAGS = $(MBGCC_LFLAGS) +######################################################################## +# Common stuff for building top level microblaze images +######################################################################## +AM_LDFLAGS += -Wl,-Map -Wl,$(@:.elf=.map) %.bin : %.elf - mb-objcopy -O binary $< $@ + $(MB_OBJCOPY) -O binary $< $@ %.dump : %.elf - mb-objdump -DSC $< > $@ + $(MB_OBJDUMP) -DSC $< > $@ %.rom : %.bin - hexdump -v -e'1/1 "%.2X\n"' $< > $@ - - -#.PRECIOUS : %.bin - + $(HEXDUMP) -v -e'1/1 "%.2X\n"' $< > $@ -BINS = $(noinst_PROGRAMS:.elf=.bin) -ROMS = $(noinst_PROGRAMS:.elf=.rom) -DUMPS = $(noinst_PROGRAMS:.elf=.dump) +_generated_from_elf = \ + $(noinst_PROGRAMS:.elf=.map) \ + $(noinst_PROGRAMS:.elf=.bin) \ + $(noinst_PROGRAMS:.elf=.dump) \ + $(noinst_PROGRAMS:.elf=.rom) -noinst_DATA = $(BINS) $(ROMS) $(DUMPS) +noinst_DATA = $(_generated_from_elf) -CLEANFILES = $(ROMS) $(DUMPS) $(BINS) +MOSTLYCLEANFILES = $(_generated_from_elf) |