########################################################################## # # $Id: makefile,v 1.9 2000/07/11 19:16:06 maurie Exp $ # # Copyright Motorola, Inc. 2000 # 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. # # ############################################################################ TARGET = config_decoder.elf DEL = rm CP = cp #DEBUG = -DDEBUG OBJECTS = config_decoder.o config_regs.o config_regs1.o \ config_utils.o config_messages.o all: $(TARGET) CC = gcc LINK = gcc $(TARGET): $(OBJECTS) config_decoder.h $(LINK) $(OBJECTS) -o $@ cp $@ a.elf ####################################################################### # the rule, .c.o says to make a .c.o file from config_decoder.h # thus it does not depend on config_decoder.h # .c.o: config_decoder.h # hence it will not do what I want, which is to # compile all the .o from the .c dependent on config_decoder.h # however, the rule below, %.o: %.c config_decoder.h # will do what I want ####################################################################### %.o: %.c config_decoder.h $(CC) -c $(DEBUG) -o $@ $< clean: $(DEL) -f *.o *.elf *.lst d6.* d7.* d8a.* d8h.* ld6.* ld7.* \ ld8a.* ld8h.*