Makefile 1.45 KB
#!smake
#
# /usr/include/make/ 򻲾ȤΤ
# 

PRDEPTH=../..
include $(ROOT)/usr/include/make/PRdefs

SUBDIRS=ddproc hello_world makefat onetri topgun

TARGET= dwrite rom

#ifdef FINAL
LCDEFS = -DNDEBUG -D_FINALROM
ARGS = FINAL=
#endif

.NOTPARALLEL:

default:$(TARGET)

CLOBBERDIR= makefat onetri hello_world topgun ddproc

fat : ./makefat/makefat onetri.rom
		./makefat/makefat ./onetri/onetri code

#	./makefat/makefat `grep onetri.rom ./onetri/gwrite` -o ./onetri/codesegment.o
#	set GLINE=`grep onetri.rom ./onetri/gwrite`
#	./makefat/makefat $$GLINE

./makefat/makefat !  
	(cd makefat; $(MAKE) $(ARGS)) 

onetri.rom : ./onetri/onetri.rom
	cp ./onetri/onetri.rom .

./onetri/onetri.rom !
	(cd onetri; $(MAKE) $(ARGS)); 

hello.rom : ./hello_world/hello.rom
	cp ./hello_world/hello.rom .

./hello_world/hello.rom !
	(cd hello_world; $(MAKE) $(ARGS)); 

rom : ./topgun/topgun.rom
	cp ./topgun/topgun ./reboot
	cp ./topgun/topgun.rom rom

./topgun/topgun.rom !
	(cd topgun; $(MAKE) $(ARGS)); 

dwrite : fat onetri.rom hello.rom
	echo "leowrite -L 49 -t 0 -I id.dat fat" > dwrite
	cat ./onetri/gwrite ./hello_world/gwrite >> dwrite

clobber :
	@for d in $(CLOBBERDIR); do $(SUBDIR_MAKERULE); done
	rm -rf $(TARGET) fat hello.rom onetri.rom reboot Makedepend

clean :
	@for d in $(CLOBBERDIR); do $(SUBDIR_MAKERULE); done
	rm -rf $(TARGET) fat hello.rom onetri.rom reboot

install:	default
	$(INSTALL) -m 444 -F /usr/src/PR/demos/reboot	\
		Makefile id.dat
	$(SUBDIRS_MAKERULE)