home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / dmake40.zip / emx / dmake.ak < prev    next >
Text File  |  1994-11-02  |  3KB  |  146 lines

  1. # Disable warnings for macros redefined here that were given
  2. # on the command line.
  3. __.SILENT := $(.SILENT)
  4. .SILENT   := yes
  5.  
  6. .IMPORT : ROOTDIR
  7.  
  8. # Configuration parameters for DMAKE startup.mk file
  9. # Set these to NON-NULL if you wish to turn the parameter on.
  10. _HAVE_RCS    := yes        # yes => RCS  is installed.
  11. _HAVE_SCCS    :=         # yes => SCCS is installed.
  12.  
  13. # Applicable suffix definitions
  14. A := .a        # Libraries
  15. E := .exe    # Executables
  16. O := .o        # Objects
  17. S := .s        # Assembler sources
  18.  
  19. # See if these are defined
  20. .IMPORT .IGNORE : COMSPEC TMPDIR SHELL
  21.  
  22. # Recipe execution configurations
  23. SHELL      := $(COMSPEC)
  24. SHELLFLAGS := /c
  25. SHELLMETAS := *"?<>|%][
  26.  
  27. # Group recipes always with Bourne shell
  28. GROUPSHELL  := sh
  29. GROUPFLAGS  :=
  30. GROUPSUFFIX := .sh
  31.  
  32. # Standard C-language command names and flags
  33. # optimize:
  34.    CC      := gcc        # C-compiler and flags
  35.    CFLAGS   = -I$(ROOTDIR)/usr/inc/emx
  36.  
  37.    AS       = $(CC)        # Assembler and flags
  38.    ASFLAGS  =
  39.  
  40.    LD       = $(CC)        # Loader and flags
  41.    LDFLAGS  =
  42.    LDLIBS   = -L$(ROOTDIR)/usr/lib/emx -lxmt
  43.  
  44.    RC       = rc        # Ressource compiler
  45.  
  46. # Definition of $(MAKE) macro for recursive makes.
  47.    MAKE       = $(MAKECMD) $(MFLAGS)
  48.  
  49. # Language and Parser generation Tools and their flags
  50.    YACC      := bison        # standard yacc
  51.    YFLAGS  = -y
  52.    YTAB      := y_tab        # yacc output files name stem.
  53.  
  54.    LEX      := flex        # standard lex
  55.    LFLAGS  =
  56.    LEXYY  := lexyy        # lex output file
  57.  
  58. # Other Compilers, Tools and their flags
  59.    CO       := co        # check out for RCS
  60.    COFLAGS := -q
  61.  
  62.    AR      := ar        # archiver
  63.    ARFLAGS = u
  64.  
  65.    RM       := rm        # remove a file command
  66.    RMFLAGS  = -c -
  67.  
  68. # Implicit generation rules for making inferences.
  69. # We don't provide .yr or .ye rules here.  They're obsolete.
  70. # Rules for making *$O
  71.    %$O : %.cc  ; $(CC) -c -o $@ $(CFLAGS)  $<
  72.    %$O : %.c   ; $(CC) -c -o $@ $(CFLAGS)  $<
  73.    %$O : %$S   ; $(CC) -c -o $@ $(ASFLAGS) $<
  74.  
  75. # Ressource files
  76.    %.res : %.rc ; $(RC) -r $< $@
  77.  
  78. # Executables
  79.    %$E : %$O ;
  80.     $(CC) -o $@ $(LDFLAGS) $< $(LDLIBS)
  81.  
  82. # lex and yacc rules
  83.    %.c : %.y 
  84.     $(YACC)  $(YFLAGS) $<
  85.     mv $(YTAB).c $@
  86.    %.cc : %.l
  87.     $(LEX)   $(LFLAGS) $<
  88.     mv $(LEXYY).c $@
  89.    %.c : %.l
  90.     $(LEX)   $(LFLAGS) $<
  91.     mv $(LEXYY).c $@
  92.    %.pc : %.py 
  93.     $(YACC)  $(YFLAGS) $<
  94.     mv $(YTAB).c $@
  95.  
  96. # RCS support
  97. .IF $(_HAVE_RCS)
  98.    % : $$(@:d)RCS.DIR/$$(@:f),v ; $(CO) $(COFLAGS) $@ $(@:d)RCS.DIR/$(@:f),v
  99.    .NOINFER : $$(@:d)RCS.DIR/$$(@:f),v
  100.  
  101.    % : $$(@:d)RCS.DIR/$$(@:f) ; $(CO) $(COFLAGS) $@ $(@:d)RCS.DIR/$(@:f)
  102.    .NOINFER : $$(@:d)RCS.DIR/$$(@:f)
  103.  
  104.    % : %,v ; $(CO) $(COFLAGS) $@ %,v
  105.    .NOINFER : %,v
  106. .END
  107.  
  108. # SCCS support
  109. .IF $(_HAVE_SCCS)
  110.    % : s.% ; get $@
  111.    .NOINFER : s.%
  112. .END
  113.  
  114. # Recipe to make archive files.
  115.   %$A : ; $(AR) $(ARFLAGS) $@ $? $(AR) s $@
  116.  
  117. # DMAKE uses this recipe to remove intermediate targets
  118. .REMOVE : ; $(RM) $(RMFLAGS) $<
  119.  
  120. # AUGMAKE extensions for SYSV compatibility
  121. "@B" = $(@:b)
  122. "@D" = $(@:d)
  123. "@F" = $(@:f)
  124. "*B" = $(*:b)
  125. "*D" = $(*:d)
  126. "*F" = $(*:f)
  127. "<B" = $(<:b)
  128. "<D" = $(<:d)
  129. "<F" = $(<:f)
  130. "?B" = $(?:b)
  131. "?F" = $(?:f)
  132. "?D" = $(?:d)
  133.  
  134. # Turn warnings back to previous setting.
  135. .SILENT := $(__.SILENT)
  136.  
  137. # Local init file if any, gets parsed before user makefile
  138. .INCLUDE .IGNORE: "_startup.mk"
  139.  
  140. ##########################################################
  141.  
  142. .IF $O == .obj
  143.   CFLAGS += -Zomf
  144.   LDFLAGS += -Zomf
  145. .END
  146.