URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Subversion Repositories or1k
[/] [or1k/] [trunk/] [orpmon/] [Makefile] - Rev 1765
Compare with Previous | Blame | View Log
ifndef CROSS_COMPILECROSS_COMPILE = or32-uclinux-endifexport CROSS_COMPILE#########################################################################TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)export TOPDIRinclude $(TOPDIR)/config.mk# order is important here:SUBDIRS = drivers common cmds services docLIBS = common/common_o.o cmds/cmds.o services/services.o drivers/drivers.o#########################################################################all: build.h orpmon.or32 orpmon-flash.or32build.h:echo "#define BUILD_VERSION \"`date`\"" > $(TOPDIR)/include/build.hdocs: Makefile$(MAKE) -C doc docs || exit 1reset.o: reset.S Makefile$(CC) -c -o $@ $< $(CFLAGS) -DIN_FLASH=0reset-flash.o: reset.S Makefile$(CC) -c -o $@ $< $(CFLAGS) -DIN_FLASH=1orpmon.or32: depend subdirs reset.o $(LIBS) Makefile gencrc$(LD) -Tram.ld -o $@ reset.o $(LIBS) $(LDFLAGS)# $(OBJCOPY) -j .text -O binary $@ $@.tmp#-S -j .vectors -j .text -j .data -j .rodata# ./gencrc $@.tmp $@orpmon-flash.or32: depend subdirs reset-flash.o $(LIBS) Makefile gencrc$(LD) -Tflash.ld -o $@ reset-flash.o $(LIBS) $(LDFLAGS)$(OBJCOPY) -O binary $@ $@.tmp# ../utils/bin2flimg 4 $@.tmp > $@.memgencrc: gencrc.c$(HOSTCC) -o gencrc -g gencrc.cSystem.map: orpmon.or32@$(NM) $< | \grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \sort > System.map#########################################################################depend dep:@for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir .depend ; donesubdirs:@for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir || exit 1 ; doneclean:find . -type f \\( -name 'core' -o -name '*.bak' -o -name '*~' \-o -name '*.o' -o -name '*.tmp' \-o -name '*.or32' -o -name '*.bin' -o -name '*.srec' \-o -name '*.mem' -o -name '*.img' -o -name '*.out' \-o -name '*.aux' -o -name '*.log' \) -print \| xargs rm -frm -f System.mapdistclean: cleanfind . -type f \\( -name .depend -o -name '*.srec' -o -name '*.bin' \-o -name '*.pdf' \) \-print | xargs rm -frm -f $(OBJS) *.bak tags TAGSrm -fr *.*~rm -f gencrc#########################################################################
