home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / misc / emu / AROSdev.lha / AROS / workbench / libs / iffparse / makefile < prev    next >
Encoding:
Makefile  |  1997-02-04  |  1.9 KB  |  89 lines

  1. # $Id: makefile,v 1.2 1997/02/04 14:08:28 digulla Exp $
  2. TOP=../../..
  3.  
  4. USER_INCLUDES = -I..
  5.  
  6. include $(TOP)/config/make.cfg
  7.  
  8. OBJDIR=$(GENDIR)/workbench/libs/iffparse
  9. DEPLIBS=$(LIBDIR)/libamiga.a $(LIBDIR)/libarosc.a
  10. LIBS=-L$(LIBDIR) -lamiga -larosc
  11.  
  12. FILES = iffparse_init iffparse_functable basicfuncs bufferingfuncs \
  13.     clipboardfuncs collectionhooks prophooks stophook
  14.  
  15. FUNCTIONS = \
  16.     allociff \
  17.     alloclocalitem \
  18.     closeclipboard \
  19.     closeiff \
  20.     collectionchunk \
  21.     collectionchunks \
  22.     currentchunk \
  23.     dosstreamhandler \
  24.     entryhandler \
  25.     exithandler \
  26.     findcollection \
  27.     findlocalitem \
  28.     findprop \
  29.     findpropcontext \
  30.     freeiff \
  31.     freelocalitem \
  32.     goodid \
  33.     goodtype \
  34.     idtostr \
  35.     iffparse_init \
  36.     initiff \
  37.     initiffasclip \
  38.     initiffasdos \
  39.     localitemdata \
  40.     openclipboard \
  41.     openiff \
  42.     parentchunk \
  43.     parseiff \
  44.     popchunk \
  45.     propchunk \
  46.     propchunks \
  47.     pushchunk \
  48.     readchunkbytes \
  49.     readchunkrecords \
  50.     setlocalitempurge \
  51.     stopchunk \
  52.     stopchunks \
  53.     stoponexit \
  54.     storeitemincontext \
  55.     storelocalitem \
  56.     writechunkbytes \
  57.     writechunkrecords
  58.  
  59. all: setup $(SLIBDIR)/iffparse.library
  60.  
  61. $(SLIBDIR)/iffparse.library: $(DEPLIBS) \
  62.         $(foreach f,$(FILES) $(FUNCTIONS),$(OBJDIR)/$(f).o)
  63.     $(CC) $(ILDFLAGS) $^ $(LIBS) -o $@
  64.  
  65. setup :
  66.     @if [ ! -d $(OBJDIR) ]; then $(MKDIR) $(OBJDIR) ; else true ; fi
  67.     @if [ ! -d $(SLIBDIR) ]; then $(MKDIR) $(SLIBDIR) ; else true ; fi
  68.  
  69. clean:
  70.     $(RM) $(OBJDIR) *.err
  71.  
  72. $(OBJDIR)/%.o: %.c
  73.     $(CC) $(CFLAGS) $< -c -o $@ 2>&1|tee $*.err
  74.     @if test ! -s $*.err; then rm $*.err ; else true ; fi
  75.  
  76. iffparse_functable.c : $(foreach f,$(FUNCTIONS),$(f).c) \
  77.         $(TOP)/scripts/makefunctable.awk
  78.     gawk -f $(TOP)/scripts/makefunctable.awk \
  79.         --assign lib=IFFParse \
  80.         $^
  81.  
  82. $(OBJDIR)/%.d: %.c
  83.     @if [ ! -d $(@D) ]; then $(MKDIR) $(@D) ; else true ; fi
  84.     $(MKDEPEND) -f- -p$(@D)/ -- $(CFLAGS) -- $^ > $@
  85.  
  86. ifneq ($(TARGET),clean)
  87. include $(foreach f,$(FILES) $(FUNCTIONS),$(OBJDIR)/$(f).d)
  88. endif
  89.