home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / GCC / GERLIB_USR08B.LHA / gerlib / support / unix / local / startup.mk < prev   
Encoding:
Text File  |  1993-12-12  |  3.2 KB  |  137 lines

  1. # Generic AMIGA DMAKE startup file.  Customize to suit your needs.
  2. # See the documentation for a description of internally defined macros.
  3. #
  4. # Disable warnings for macros redefined here that were given
  5. # on the command line.
  6. __.SILENT := $(.SILENT)
  7. .SILENT   := yes
  8.  
  9. # Configuration parameters for DMAKE startup.mk file
  10. # Set these to NON-NULL if you wish to turn the parameter on.
  11. _HAVE_RCS    := yes        # yes => RCS  is installed.
  12. _HAVE_SCCS    :=         # yes => SCCS is installed.
  13.  
  14. # Applicable suffix definitions
  15. A := .a        # Libraries
  16. E :=        # Executables
  17. F := .f        # Fortran
  18. O := .o        # Objects
  19. P := .p        # Pascal
  20. S := .s        # Assembler sources
  21. V := ,v        # RCS suffix
  22.  
  23. # Recipe execution configurations
  24. SHELL        := sh
  25. SHELLFLAGS    := -c
  26. GROUPSHELL    := $(SHELL)
  27. GROUPFLAGS    :=
  28. SHELLMETAS    := |();&<>?*][$$:\\#`'"
  29. GROUPSUFFIX    :=
  30. DIVFILE         = $(TMPFILE)
  31.  
  32. # Standard C-language command names and flags
  33.    CPP       := gccv -E        # C-preprocessor
  34.    CC      := gccv        # C-compiler and flags
  35.    CFLAGS  +=
  36.  
  37.    AS      := $(CC)        # Assembler and flags
  38.    ASFLAGS +=
  39.  
  40.    LD       = $(CC)        # Loader and flags
  41.    LDFLAGS +=
  42.    LDLIBS   =
  43.  
  44. # Definition of $(MAKE) macro for recursive makes.
  45.    MAKE = $(MAKECMD) $(MFLAGS)
  46.  
  47. # Definition of Print command for this system.
  48.    PRINT = lpr
  49.  
  50. # Language and Parser generation Tools and their flags
  51.    YACC      := bison        # standard yacc
  52.    YFLAGS += -y
  53.    YTAB      := y.tab        # yacc output files name stem.
  54.  
  55.    LEX      := flex        # standard lex
  56.    LFLAGS +=
  57.    LEXYY  := lex.yy        # lex output file
  58.  
  59. # Other Compilers, Tools and their flags
  60.    PC    := pc            # pascal compiler
  61.    RC    := f77            # ratfor compiler
  62.    FC    := f77            # fortran compiler
  63.  
  64.    CO       := co        # check out for RCS
  65.    COFLAGS += -q
  66.  
  67.    AR     := ar            # archiver
  68.    ARFLAGS+= ruv
  69.  
  70.    RM       := rm          # remove a file command
  71.    RMFLAGS += -f
  72.  
  73. # Implicit generation rules for making inferences.
  74. # We don't provide .yr or .ye rules here.  They're obsolete.
  75. # Rules for making *$O
  76.    %$O : %.c ; $(CC) $(CFLAGS) -c $<
  77.    %$O : %.cc; $(CC) $(CFLAGS) -c $<
  78.    %$O : %.C ; $(CC) $(CFLAGS) -c $<
  79.    %$O : %$P ; $(PC) $(PFLAGS) -c $<
  80.    %$O : %$S ; $(AS) $(ASFLAGS) $<
  81.    %$O : %.cl ; class -c $<
  82.    %$O : %.e %.r %.F %$F
  83.     $(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $<
  84.  
  85. # Executables
  86.    %$E : %$O ; $(LD) $(LDFLAGS) -o $@ $< $(LDLIBS)
  87.  
  88. # lex and yacc rules
  89.    %.c : %.y ; $(YACC)  $(YFLAGS) $<; move $(YTAB).c $@
  90.    %.c : %.l ; $(LEX)   $(LFLAGS) $<; move $(LEXYY).c $@
  91.  
  92. # This rule tells how to make *.out from it's immediate list of prerequisites
  93. # UNIX only.
  94.    %.out :; $(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS)
  95.  
  96. # RCS support
  97. .IF $(_HAVE_RCS)
  98.    % : %$V $$(@:d)RCS/$$(@:f)$V;- $(CO) $(COFLAGS) $@
  99.    .NOINFER : %$V $$(@:d)RCS/$$(@:f)$V
  100. .END
  101.  
  102. # SCCS support
  103. .IF $(_HAVE_SCCS)
  104.    % : s.% ; get $@
  105.    .NOINFER : s.%
  106. .END
  107.  
  108. # Recipe to make archive files.
  109. %$A :
  110. [
  111.    $(AR) $(ARFLAGS) $@ $?
  112.    $(RM) $(RMFLAGS) $?
  113. ]
  114.  
  115. # DMAKE uses this recipe to remove intermediate targets
  116. .REMOVE :; $(RM) -f $<
  117.  
  118. # AUGMAKE extensions for SYSV compatibility
  119. @B = $(@:b)
  120. @D = $(@:d)
  121. @F = $(@:f)
  122. *B = $(*:b)
  123. *D = $(*:d)
  124. *F = $(*:f)
  125. <B = $(<:b)
  126. <D = $(<:d)
  127. <F = $(<:f)
  128. ?B = $(?:b)
  129. ?F = $(?:f)
  130. ?D = $(?:d)
  131.  
  132. # Turn warnings back to previous setting.
  133. .SILENT := $(__.SILENT)
  134.  
  135. # Local startup file if any
  136. .INCLUDE .IGNORE: "_startup.mk"
  137.