1 # MSDOS DMAKE startup file. Customize to suit your needs.
2 # Assumes MKS toolkit for the tool commands, and Zortech C. Change as req'd.
3 # See the documentation for a description of internally defined macros.
5 # Disable warnings for macros redefined here that were given
7 __.SILENT
!:= $(.SILENT
)
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.
15 # Applicable suffix definitions
17 E
:= .exe
# Executables
21 S
:= .asm
# Assembler sources
24 # See if these are defined
25 .IMPORT .IGNORE
: TMPDIR SHELL COMSPEC ROOTDIR
26 TMPDIR
*:= $(ROOTDIR
)/tmp
28 # Recipe execution configurations
29 # First set SHELL, If it is not defined, use COMSPEC, otherwise
30 # it is assumed to be MKS Korn SHELL.
31 .IF
$(SHELL
) == $(NULL
)
32 .IF
$(COMSPEC
) == $(NULL
)
33 SHELL
:= $(ROOTDIR
)/bin
/sh
$E
38 GROUPSHELL
:= $(SHELL
)
40 # Now set remaining arguments depending on which SHELL we
41 # are going to use. COMSPEC (assumed to be command.com) or
43 .IF
$(SHELL
)==$(COMSPEC
)
44 SHELLFLAGS
:= $(SWITCHAR
)c
45 GROUPFLAGS
:= $(SHELLFLAGS
)
49 DIVFILE = $(TMPFILE:s,/,\,)
53 SHELLMETAS := *"?
<>|
()&][$$\
#`'
56 DIVFILE
= $(TMPFILE
:s
,/,${DIVSEP_shell_
${USESHELL}},)
57 DIVSEP_shell_yes
:= \\\
61 # Standard C-language command names and flags
62 CC
:= ztc
# C-compiler and flags
65 AS
:= masm
# Assembler and flags
68 LD
= blink
# Loader and flags
72 # Definition of $(MAKE) macro for recursive makes.
73 MAKE
= $(MAKECMD
) -S
$(MFLAGS
)
75 # Language and Parser generation Tools and their flags
76 YACC
:= yacc # standard yacc
78 YTAB
:= ytab
# yacc output files name stem.
80 LEX
:= lex # standard lex
82 LEXYY
:= lex_yy
# lex output file
84 # Other Compilers, Tools and their flags
85 PC
:= any_pc
# pascal compiler
86 RC
:= anyf77
# ratfor compiler
87 FC
:= anyf77
# fortran compiler
89 CO
:= co # check out for RCS
95 RM
:= rm # remove a file command
98 # Implicit generation rules for making inferences.
99 # We don't provide .yr or .ye rules here. They're obsolete.
100 # Rules for making *$O
101 %$O : %.c
; $(CC
) $(CFLAGS
) -c
$<
102 %$O : %.
cpp ; $(CC
) $(CFLAGS
) -c
$<
103 %$O : %$P ; $(PC
) $(PFLAGS
) -c
$<
104 %$O : %$S ; $(AS
) $(ASFLAGS
) $(<:s
,/,\
);
105 %$O : %.cl
; class
-c
$<
106 %$O :|
%.e
%.r
%.F
%$F ; $(FC
) $(RFLAGS
) $(EFLAGS
) $(FFLAGS
) -c
$<
109 %$E : %$O ; $(CC
) $(LDFLAGS
) -o
$@
$< $(LDLIBS
)
112 %.c
: %.y
; $(YACC
) $(YFLAGS
) $<; mv
$(YTAB
).c
$@
113 %.c
: %.l
; $(LEX
) $(LFLAGS
) $<; mv
$(LEXYY
).c
$@
117 % : $$(@
:d
)RCS
$$(DIRSEPSTR
)$$(@
:f
)$V;- $(CO
) $(COFLAGS
) $@
118 .NOINFER
: $$(@
:d
)RCS
$$(DIRSEPSTR
)$$(@
:f
)$V
127 # Recipe to make archive files.
129 $(AR
) $(ARFLAGS
) $@
$?
132 # DMAKE uses this recipe to remove intermediate targets
133 .REMOVE
:; $(RM
) -f
$<
135 # AUGMAKE extensions for SYSV compatibility
149 # Turn warnings back to previous setting.
150 .SILENT
!:= $(__.SILENT
)
152 # Local init file if any, gets parsed before user makefile
153 .INCLUDE .IGNORE
: "_startup.mk"