home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / DMAKE38C.ZIP / MAC / STARTUP.MK < prev    next >
Text File  |  1991-09-19  |  4KB  |  127 lines

  1. # MPW Mac startup file.  Customize to suit your needs.
  2. # Assumes MPW C.  Change as req'd.
  3. # See the documentation for a description of internally defined macros.
  4. #
  5. # Disable warnings for macros redefined here that were given
  6. # on the command line.
  7. __.SILENT := $(.SILENT)
  8. .SILENT   := yes
  9.  
  10. # Configuration parameters for DMAKE startup.mk file
  11. # Set these to NON-NULL if you wish to turn the parameter on.
  12. _HAVE_RCS    := yes        # yes => RCS  is installed.
  13. _HAVE_SCCS    :=         # yes => SCCS is installed.
  14.  
  15. # Applicable suffix definitions
  16. A := .lib    # Libraries
  17. C := .c        # C
  18. E :=         # Executables
  19. F := .f        # Fortran
  20. O := .c.o    # Object files: Assume they are created from C files
  21. P := .p        # Pascal
  22. S := .a        # Assembler sources
  23. V := v        # RCS suffix
  24.  
  25. # See if these are defined
  26. TMPDIR := $(MPW)/tmp
  27. .IMPORT .IGNORE : TMPDIR
  28. .IMPORT .IGNORE : CLibraries Libraries
  29.  
  30. # Set arguments for the SHELL.  Since we can't execute sub-processes,
  31. # these variables are not important, except for some makefiles that check
  32. # for some values to determine the platform.
  33. SHELL := mpw
  34. SHELLFLAGS  :=
  35. GROUPFLAGS  :=
  36. SHELLMETAS  :=
  37. GROUPSUFFIX :=
  38. DIVFILE      = $(TMPFILE)
  39.  
  40. # Standard C-language command names and flags
  41.    CC      := c            # C-compiler and flags
  42.    CFLAGS  +=
  43.  
  44.    AS      := asm        # Assembler and flags
  45.    ASFLAGS +=
  46.  
  47.    LD       = link        # Loader and flags
  48.    LDFLAGS +=
  49.    LDLIBS   = "$(CLibraries)CSANELib.o" "$(CLibraries)Math.o" \
  50.               "$(CLibraries)StdCLib.o" "$(Libraries)Runtime.o" \
  51.               "$(Libraries)Interface.o" "$(Libraries)Toollibs.o"
  52.  
  53. # Definition of $(MAKE) macro for recursive makes.
  54.    MAKE = $(MAKECMD) $(MFLAGS)
  55.  
  56. # Language and Parser generation Tools and their flags
  57.    YACC      := yacc        # standard yacc
  58.    YFLAGS +=
  59.    YTAB      := ytab        # yacc output files name stem.
  60.  
  61.    LEX      := lex        # standard lex
  62.    LFLAGS +=
  63.    LEXYY  := lex_yy        # lex output file
  64.  
  65. # Other Compilers, Tools and their flags
  66.    PC    := any_pc        # pascal compiler
  67.    RC    := anyf77        # ratfor compiler
  68.    FC    := anyf77        # fortran compiler
  69.  
  70.    CO       := co        # check out for RCS
  71.    COFLAGS += -q
  72.  
  73.    RM       := delete    # remove a file command
  74.    RMFLAGS +=
  75.  
  76. # Implicit generation rules for making inferences.
  77. # We don't provide .yr or .ye rules here.  They're obsolete.
  78. # Rules for making *$O
  79.    %$C.o : %$C ; $(CC) $(CFLAGS) -c $<
  80.    %$P.o : %$P ; $(PC) $(PFLAGS) -c $<
  81.    %$S.o : %$S ; $(AS) $(ASFLAGS) $(<:s,/,\);
  82.    %$F.o : %$F ; $(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $<
  83.  
  84. # Executables rules should go here.  However, on the Mac, there is not
  85. # executable suffix (such as ".exe") and thus we end up with rules like
  86. # "% : %.c.o", which cause circular-dependency errors.  Thus, it's easier
  87. # just to avoid specifiying any default rule for executables.
  88.  
  89. # lex and yacc rules
  90.    %.c : %.y ; $(YACC)  $(YFLAGS) $<; mv $(YTAB).c $@
  91.    %.c : %.l ; $(LEX)   $(LFLAGS) $<; mv $(LEXYY).c $@
  92.  
  93. # RCS support
  94. .IF $(_HAVE_RCS)
  95.    % : $$(@:d)RCS$$(DIRSEPSTR)$$(@:f)$V;- $(CO) $(COFLAGS) $@
  96.    .NOINFER : $$(@:d)RCS$$(DIRSEPSTR)$$(@:f)$V
  97. .END
  98.  
  99. # SCCS support
  100. .IF $(_HAVE_SCCS)
  101.    % : s.% ; get $@
  102.    .NOINFER : s.%
  103. .END
  104.  
  105. # DMAKE uses this recipe to remove intermediate targets
  106. .REMOVE :; $(RM) $<
  107.  
  108. # AUGMAKE extensions for SYSV compatibility
  109. @B = $(@:b)
  110. @D = $(@:d)
  111. @F = $(@:f)
  112. "*B" = $(*:b)
  113. "*D" = $(*:d)
  114. "*F" = $(*:f)
  115. <B = $(<:b)
  116. <D = $(<:d)
  117. <F = $(<:f)
  118. ?B = $(?:b)
  119. ?F = $(?:f)
  120. ?D = $(?:d)
  121.  
  122. # Turn warnings back to previous setting.
  123. .SILENT := $(__.SILENT)
  124.  
  125. # Local init file if any, gets parsed before user makefile
  126. .INCLUDE .IGNORE: "_startup.mk"
  127.