update dev300-m58
[ooovba.git] / dmake / msdos / zortech / startup.mk
blob2697f738bb5b1937ecb1a1fd714a0fc3aad8ecfa
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
6 # on the command line.
7 __.SILENT !:= $(.SILENT)
8 .SILENT !:= yes
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
16 A := .lib # Libraries
17 E := .exe # Executables
18 F := .for # Fortran
19 O := .obj # Objects
20 P := .pas # Pascal
21 S := .asm # Assembler sources
22 V := # RCS suffix
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
34 .ELSE
35 SHELL := $(COMSPEC)
36 .END
37 .END
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
42 # MKS Korn Shell.
43 .IF $(SHELL)==$(COMSPEC)
44 SHELLFLAGS := $(SWITCHAR)c
45 GROUPFLAGS := $(SHELLFLAGS)
46 SHELLMETAS := *"?<>
47 GROUPSUFFIX := .bat
48 DIRSEPSTR := \\\
49 DIVFILE = $(TMPFILE:s,/,\,)
50 .ELSE
51 SHELLFLAGS := -c
52 GROUPFLAGS :=
53 SHELLMETAS := *"?<>|()&][$$\#`'
54 GROUPSUFFIX := .ksh
55 .MKSARGS := yes
56 DIVFILE = $(TMPFILE:s,/,${DIVSEP_shell_${USESHELL}},)
57 DIVSEP_shell_yes := \\\
58 DIVSEP_shell_no := \\
59 .END
61 # Standard C-language command names and flags
62 CC := ztc # C-compiler and flags
63 CFLAGS +=
65 AS := masm # Assembler and flags
66 ASFLAGS +=
68 LD = blink # Loader and flags
69 LDFLAGS +=
70 LDLIBS =
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
77 YFLAGS +=
78 YTAB := ytab # yacc output files name stem.
80 LEX := lex # standard lex
81 LFLAGS +=
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
90 COFLAGS += -q
92 AR := ar # archiver
93 ARFLAGS+= ruv
95 RM := rm # remove a file command
96 RMFLAGS +=
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 $<
108 # Executables
109 %$E : %$O ; $(CC) $(LDFLAGS) -o$@ $< $(LDLIBS)
111 # lex and yacc rules
112 %.c : %.y ; $(YACC) $(YFLAGS) $<; mv $(YTAB).c $@
113 %.c : %.l ; $(LEX) $(LFLAGS) $<; mv $(LEXYY).c $@
115 # RCS support
116 .IF $(_HAVE_RCS)
117 % : $$(@:d)RCS$$(DIRSEPSTR)$$(@:f)$V;- $(CO) $(COFLAGS) $@
118 .NOINFER : $$(@:d)RCS$$(DIRSEPSTR)$$(@:f)$V
119 .END
121 # SCCS support
122 .IF $(_HAVE_SCCS)
123 % : s.% ; get $<
124 .NOINFER : s.%
125 .END
127 # Recipe to make archive files.
128 %$A .SWAP .GROUP :
129 $(AR) $(ARFLAGS) $@ $?
130 $(RM) $(RMFLAGS) $?
132 # DMAKE uses this recipe to remove intermediate targets
133 .REMOVE :; $(RM) -f $<
135 # AUGMAKE extensions for SYSV compatibility
136 "@B" = $(@:b)
137 "@D" = $(@:d)
138 "@F" = $(@:f)
139 "*B" = $(*:b)
140 "*D" = $(*:d)
141 "*F" = $(*:f)
142 "<B" = $(<:b)
143 "<D" = $(<:d)
144 "<F" = $(<:f)
145 "?B" = $(?:b)
146 "?F" = $(?:f)
147 "?D" = $(?:d)
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"