home *** CD-ROM | disk | FTP | other *** search
/ MACD 4 / MACD4.iso / Emulatory / AROS / utility / makefile < prev    next >
Encoding:
Makefile  |  1978-03-06  |  1.2 KB  |  43 lines

  1. # $Id: makefile,v 1.19 1996/10/29 15:06:43 aros Exp $
  2. TOP=..
  3.  
  4. include $(TOP)/config/make.cfg
  5.  
  6. FILES = utility_init utility_functable
  7. FUNCTIONS = \
  8.     applytagchanges callhookpkt findtagitem nexttagitem \
  9.     stricmp strnicmp tolower toupper getuniqueid smult32 umult32 \
  10.     smult64 umult64 date2amiga amiga2date allocatetagitems \
  11.     freetagitems clonetagitems gettagdata packbooltags \
  12.     refreshtagitemclones taginarray maptags
  13.  
  14. all: setup \
  15.     $(foreach f,$(FILES),$(OSGENDIR)/$(f).o) \
  16.     $(foreach f,$(FUNCTIONS),$(OSGENDIR)/$(f).o)
  17.  
  18. setup :
  19.     @if [ ! -d $(OSGENDIR) ]; then $(MKDIR) $(OSGENDIR) ; else true ; fi
  20.  
  21. clean:
  22.     $(RM) $(OSGENDIR) *.err $(LIBDIR)/libutility.a
  23.  
  24. $(OSGENDIR)/%.o: %.c
  25.     $(CC) $(CFLAGS) $< -c -o $@ 2>&1|tee $*.err
  26.     if test ! -s $*.err; then rm $*.err ; else true ; fi
  27.  
  28. utility_functable.c: $(foreach f,$(FUNCTIONS),$(f).c) \
  29.         $(TOP)/scripts/makefunctable.awk
  30.     gawk -f $(TOP)/scripts/makefunctable.awk \
  31.         --assign lib=Utility \
  32.         $^
  33.  
  34. $(OSGENDIR)/%.d: %.c
  35.     @if [ ! -d $(OSGENDIR) ]; then $(MKDIR) $(OSGENDIR) ; else true ; fi
  36.     @$(RM) $@
  37.     @touch $@
  38.     $(MKDEPEND) -p$(OSGENDIR)/
  39.  
  40. include $(foreach f,$(FILES),$(OSGENDIR)/$(f).d)
  41. include $(foreach f,$(FUNCTIONS),$(OSGENDIR)/$(f).d)
  42.  
  43.