# Copyright Motorola, Inc. 1993, 1994 # ALL RIGHTS RESERVED # # You are hereby granted a copyright license to use, modify, and # distribute the SOFTWARE so long as this entire notice is retained # without alteration in any modified and/or redistributed versions, # and that such modified versions are clearly identified as such. # No licenses are granted by implication, estoppel or otherwise under # any patents or trademarks of Motorola, Inc. # # The SOFTWARE is provided on an "AS IS" basis and without warranty. # To the maximum extent permitted by applicable law, MOTOROLA DISCLAIMS # ALL WARRANTIES WHETHER EXPRESS OR IMPLIED, INCLUDING IMPLIED # WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR # PURPOSE AND ANY WARRANTY AGAINST INFRINGEMENT WITH # REGARD TO THE SOFTWARE (INCLUDING ANY MODIFIED VERSIONS # THEREOF) AND ANY ACCOMPANYING WRITTEN MATERIALS. # # To the maximum extent permitted by applicable law, IN NO EVENT SHALL # MOTOROLA BE LIABLE FOR ANY DAMAGES WHATSOEVER # (INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS OF # BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS # INFORMATION, OR OTHER PECUNIARY LOSS) ARISING OF THE USE OR # INABILITY TO USE THE SOFTWARE. Motorola assumes no responsibility # for the maintenance and support of the SOFTWARE. # CC = cc CCobj = $(CC) -c -O CCsys = cc LNK = $(CC) DEL = rm MOVE = mv COPY = cp LIST = ls -l RENAME = $(MOVE) SREC = xc2srec COMPRESS = dcomp DIR = unix_dir REGISTERS = $(DIR)/reg_tb.o $(DIR)/reg_spr.o # handling registers MEMORY = $(DIR)/mem_tb.o# # memory arrangments PARSER = $(DIR)/tok_tb.o $(DIR)/arg_tb.o $(DIR)/rfs_tb.o \ $(DIR)/par_tb.o $(DIR)/toks.o# ERRORS = $(DIR)/errors.o $(DIR)/err_tb.o# # error checking and handling DOWNLOAD = $(DIR)/downld.o $(DIR)/dc_tb.o# # download and compress INPUTOUTPUT = $(DIR)/duart.o $(DIR)/print.o# ASMDSM = $(DIR)/asm.o $(DIR)/dsm.o# MISC = $(DIR)/help.o $(DIR)/brk_pts.o $(DIR)/sublib.o # help & brkpoints DINKMAIN = $(DIR)/main.o# # initialization and main loop DINKWORKERS = $(REGISTERS) $(MEMORY) $(DOWNLOAD) $(ASMDSM) $(MISC) DINKINTERFACE = $(PARSER) $(ERRORS) $(INPUTOUTPUT) DINKOBJECTS = $(DINKMAIN) $(DINKWORKERS) $(DINKINTERFACE) DCOMPOBJECTS = $(DIR)/dc_tb_unix.o $(DIR)/dc_unix.o XCOBJECTS = $(DIR)/xc2srec.o all : utils $(DIR)/dink32 utils: $(DIR)/dcomp $(DIR)/xc2srec $(DIR): mkdir $@ # make target directory $(DIR)/dcomp: $(DCOMPOBJECTS) $(DIR) $(CCsys) $(DCOMPOBJECTS) -o $@ $(LIST) $@ $(DIR)/xc2srec: $(XCOBJECTS) $(DIR) $(CCsys) $(XCOBJECTS) -lld -o $@ $(LIST) $@ $(DIR)/dink32: $(DINKOBJECTS) $(DIR) $(LNK) $(DINKOBJECTS) $(LIBS) -o $@ cd $(DIR);\ $(SREC) dink32;\ $(RENAME) dink32.mx dink32.srec;\ $(COMPRESS) -c dink32.csrec;\ cd .. $(LIST) $(DIR)/dink32 $(LIST) $(DIR)/dink32.*srec clean: $(DEL) -rf $(DIR) clean_exe: $(DEL) $(DIR)/dink32 relink : clean_exe $(DIR)/dink32 shrink: clean remake : clean all .c.o: $(CCobj) $*.c -o $*.o INC_ALL = config.h INC_C = dink.h INC_TOK = tok_tb.h toks.h INC_GEN = errors.h cpu.h $(DIR)/reg_tb.o: $(INC_ALL) $(INC_C) $(INC_TOK) $(INC_GEN) reg_tb.c reg_tb.h $(CCobj) reg_tb.c -o $@ $(DIR)/reg_spr.o: $(INC_ALL) $(INC_C) $(INC_TOK) $(INC_GEN) reg_spr.c reg_tb.h $(CCobj) reg_spr.c -o $@ $(DIR)/mem_tb.o: $(INC_ALL) $(INC_C) $(INC_TOK) $(INC_GEN) mem_tb.c $(CCobj) mem_tb.c -o $@ $(DIR)/tok_tb.o: $(INC_ALL) $(INC_C) $(INC_TOK) tok_tb.c $(CCobj) tok_tb.c -o $@ $(DIR)/arg_tb.o: $(INC_ALL) $(INC_C) $(INC_TOK) $(INC_GEN) arg_tb.c rfs_tb.h $(CCobj) arg_tb.c -o $@ $(DIR)/rfs_tb.o: $(INC_ALL) $(INC_C) $(INC_GEN) rfs_tb.c rfs_tb.h $(CCobj) rfs_tb.c -o $@ $(DIR)/par_tb.o: $(INC_ALL) $(INC_C) $(INC_TOK) par_tb.c errors.h \ command_tb.h reg_spr.h $(CCobj) par_tb.c -o $@ $(DIR)/toks.o: $(INC_ALL) $(INC_C) $(INC_TOK) toks.c errors.h $(CCobj) toks.c -o $@ $(DIR)/err_tb.o : $(INC_ALL) $(INC_C) $(INC_TOK) err_tb.c err_tb.h $(CCobj) err_tb.c -o $@ $(DIR)/errors.o : $(INC_ALL) $(INC_C) $(INC_GEN) errors.c $(CCobj) errors.c -o $@ $(DIR)/help.o : $(INC_ALL) $(INC_C) $(INC_TOK) help.c arg_tb.h \ rfs_tb.h errors.h $(CCobj) help.c -o $@ $(DIR)/brk_pts.o : $(INC_ALL) $(INC_C) $(INC_GEN) brk_pts.c brk_pts.h $(CCobj) brk_pts.c -o $@ $(DIR)/sublib.o : $(INC_ALL) $(INC_C) $(INC_GEN) sublib.c $(CCobj) sublib.c -o $@ $(DIR)/dc_tb.o : $(INC_ALL) $(INC_C) $(INC_GEN) dc_tb.c $(CCobj) dc_tb.c -o $@ $(DIR)/downld.o : $(INC_ALL) $(INC_C) $(INC_GEN) downld.c $(CCobj) downld.c -o $@ $(DIR)/duart.o: $(INC_ALL) $(INC_C) $(INC_GEN) unduart.c duart.h $(CCobj) unduart.c -o $@ $(DIR)/print.o : $(INC_ALL) $(INC_C) $(INC_GEN) print.c $(CCobj) print.c -o $@ $(DIR)/asm.o : $(INC_ALL) $(INC_C) $(INC_GEN) asm.c asm_dsm.h symtab.h $(CCobj) asm.c -o $@ $(DIR)/dsm.o : $(INC_ALL) $(INC_C) $(INC_GEN) dsm.c asm_dsm.h $(CCobj) dsm.c -o $@ $(DIR)/main.o : $(INC_ALL) $(INC_C) $(INC_TOK) main.c errors.h \ arg_tb.h reg_tb.h duart.h $(CCobj) main.c -o $@ $(DIR)/dc_tb_unix.o : $(INC_C) $(INC_GEN) dc_tb.c $(DIR) $(CCsys) -c dc_tb.c -o $@ $(DIR)/dc_unix.o : dc_unix.c $(DIR) $(CCsys) -c dc_unix.c -o $@ $(DIR)/xc2srec.o : xc2srec.c $(DIR) $(CCsys) -c xc2srec.c -o $@