home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / misc / emu / AROSdev.lha / AROS / config / freebsd / makefile
Encoding:
Makefile  |  1997-02-07  |  877 b   |  35 lines

  1. # $Id: makefile,v 1.6 1997/02/07 15:26:44 digulla Exp $
  2.  
  3. TOP=../..
  4. COMPILE_KERNEL = yes # Must have a value, no matter which one
  5.  
  6. USER_INCLUDES=-I$(TOP)/rom/graphics -I$(TOP)/rom/intuition
  7.  
  8. include $(TOP)/config/make.cfg
  9.  
  10. FILES = graphics_driver intuition_driver
  11.  
  12. all: setup \
  13.     $(foreach f,$(FILES),$(OSGENDIR)/$(f).o)
  14.  
  15. setup :
  16.     @if [ ! -d $(OSGENDIR) ]; then $(MKDIR) $(OSGENDIR) ; else true ; fi
  17.  
  18. clean:
  19.     -$(RM) $(OSGENDIR) *.err
  20.  
  21. graphics_driver.c intuition_driver.c:
  22.     $(TOP)/scripts/makelinks ../linux/ . $@
  23.  
  24. $(OSGENDIR)/%.o: %.c
  25.     $(CC) $(SHARED_CFLAGS) $(CFLAGS) $(GUI_CCFLAGS) $< -c -o $@ 2>&1|tee $*.err
  26.     @if test ! -s $*.err; then rm $*.err ; else true ; fi
  27.  
  28. $(OSGENDIR)/%.d: %.c
  29.     @if [ ! -d $(@D) ]; then $(MKDIR) $(@D) ; else true ; fi
  30.     $(MKDEPEND) -f- -p$(@D)/ -- $(CFLAGS) -- $^ > $@
  31.  
  32. ifneq ($(TARGET),clean)
  33. -include $(foreach f,$(FILES),$(OSGENDIR)/$(f).d)
  34. endif
  35.