home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / misc / emu / AROSdev.lha / AROS / config / linux / makefile < prev   
Encoding:
Makefile  |  1997-02-07  |  823 b   |  38 lines

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