home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / misc / emu / AROSdev.lha / AROS / config / amiga / boot / makefile < prev    next >
Encoding:
Makefile  |  1997-02-07  |  1.2 KB  |  47 lines

  1. #
  2. #   (C) 1995-96 AROS - The Amiga Replacement OS
  3. #   $Id: makefile,v 1.6 1997/02/06 15:22:46 ldp Exp $
  4. #
  5. #   Desc: Amiga bootloader -- makefile
  6. #   Lang: english
  7. #
  8.  
  9. # The files in this directory build a stand-alone executable, used to
  10. # install AROS' modules in the system. These modules will become active
  11. # after a reset. More information in the source files.
  12.  
  13. TOP=../../..
  14.  
  15. include $(TOP)/config/make.cfg
  16.  
  17. # Flags to use for the module loader
  18. LDFLAGS = -noixemul
  19.  
  20. FILES = main ils config
  21.  
  22. all:    setup $(BINDIR)/boot $(BINDIR)/boot.config
  23.  
  24. clean:
  25.     -rm -f $(BINDIR)/boot
  26.  
  27. setup :
  28.     @if [ ! -d $(BINDIR) ]; then $(MKDIR) $(BINDIR) ; else true ; fi
  29.     @if [ ! -d $(BOOTGENDIR) ]; then $(MKDIR) $(BOOTGENDIR) ; else true ; fi
  30.  
  31. $(BOOTGENDIR)/%.o: %.c
  32.     $(CC) $(CFLAGS) $< -c -o $@ 2>&1|tee $*.err
  33.     @if test ! -s $*.err; then rm $*.err ; else true ; fi
  34.  
  35. $(BINDIR)/boot: $(foreach f,$(FILES),$(BOOTGENDIR)/$(f).o)
  36.     $(CC) $(LDFLAGS) $(foreach f,$(FILES),$(BOOTGENDIR)/$(f).o) -o $@
  37.     strip $@
  38.  
  39. $(BINDIR)/boot.config: boot.config
  40.     $(CP) $< $@
  41.  
  42. $(BOOTGENDIR)/%.d: %.c
  43.     @if [ ! -d $(@D) ]; then $(MKDIR) $(@D) ; else true ; fi
  44.     $(MKDEPEND) -f- -p$(@D)/ -- $(CFLAGS) -- $^ > $@
  45.  
  46. include $(foreach f,$(FILES),$(BOOTGENDIR)/$(f).d)
  47.