forked from FDOS/freecom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
153 lines (120 loc) · 4.46 KB
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# $Id$
#
# Makefile for the FreeDOS kernel's command interpreter
#
# $Log$
# Revision 1.18 2003/04/28 15:57:43 skaus
# v0.82 pl 2:
#
# Revision 1.17 2002/05/11 22:10:36 skaus
# v0.83 Beta 40:
# bugfix: ^Break detection after XMS-Swapping
#
# Revision 1.16 2001/07/27 22:37:34 skaus
# bugfix: pre-compiled package BINARY.ZIP without command-line editing
# chg: FreeCOM archive (== executable) is opened read-only.
#
# Revision 1.15 2001/04/29 11:33:50 skaus
# chg: default heap size (tools\ptchsize) set to 6KB
# chg: error displaying functions centralized into lib\err_fcts.src
# add: displayError()
# chg: all errors are displayed through functions void error_*()
# bugfix: somtimes error messages are not displayed (see displayError())
# bugfix: docommand(): type:file must pass ":file" to TYPE
# bugfix: error_sfile(): string _SFILE_
# bugfix: error message on empty redirection
# bugfix: comma and semicolon ';' are recognized as argument seperators
# of internal commands
#
# Revision 1.14 2001/04/12 00:09:06 skaus
# chg: New structure
# chg: If DEBUG enabled, no available commands are displayed on startup
# fix: PTCHSIZE also patches min extra size to force to have this amount
# of memory available on start
# bugfix: CALL doesn't reset options
# add: PTCHSIZE to patch heap size
# add: VSPAWN, /SWAP switch, .SWP resource handling
# bugfix: COMMAND.COM A:\
# bugfix: CALL: if swapOnExec == ERROR, no change of swapOnExec allowed
# add: command MEMORY
# bugfix: runExtension(): destroys command[-2]
# add: clean.bat
# add: localized CRITER strings
# chg: use LNG files for hard-coded strings (hangForEver(), init.c)
# via STRINGS.LIB
# add: DEL.C, COPY.C, CBREAK.C: STRINGS-based prompts
# add: fixstrs.c: prompts & symbolic keys
# add: fixstrs.c: backslash escape sequences
# add: version IDs to DEFAULT.LNG and validation to FIXSTRS.C
# chg: splitted code apart into LIB\*.c and CMD\*.c
# bugfix: IF is now using error system & STRINGS to report errors
# add: CALL: /N
#
#
.IMPORT : FREEDOS
# # .IMPORT .IGNORE : LNG DEBUG NDEBUG
# # INCDIR+=;$(FREEDOS)\SRC\INCLUDE;$(PWD:u)\\INCLUDE
# # LIBDIR+=;$(FREEDOS)\SRC\LIB\$(_COMPILER)
# # LDLIBS = $(FREEDOS)\SRC\LIB\$(_COMPILER)\Suppl_$(_MODEL).lib CMD\\CMDS.LIB LIB\\FREECOM.LIB STRINGS\\STRINGS.LIB
# # LDFLAGS += /msl
# # NASM *= c:\TOOL\NASMW.EXE
# Use BC5 linker in order to use TD of BC5
# # LD_TLINK != D:\BC5\BIN\TLINK.EXE
# Project specific C compiler flags
# # MYCFLAGS_DBG = -UNDEBUG $(null,$(DEBUG) $(NULL) -DDEBUG=1)
# # MYCFLAGS_NDBG = -DNDEBUG=1 -UDEBUG
# # MYCFLAGS = $(null,$(NDEBUG) $(MYCFLAGS_DBG) $(MYCFLAGS_NDBG))
# Project specific NASM compiler flags
# # NASMFLAGS_DBG = $(null,$(DEBUG) $(NULL) -DDEBUG=1) -s
# # NASMFLAGS_NDBG = -s
# # NASMFLAGS = $(null,$(NDEBUG) $(NASMFLAGS_DBG) $(NASMFLAGS_NDBG))
# # RUNMAKE = $(MAKE) LNG=$(LNG) NASM=$(NASM) DEBUG=$(DEBUG) NDEBUG=$(NDEBUG) MODEL=$(MODEL)
.INCLUDE : _config.mk
GLOBAL_DEPS = err_fcts.h
# # .SOURCE.lib := $(LIBDIR:s/;/ /:u)
# Sources of this make target
SRC =
# # .INCLUDE .IGNORE : lastmake.mk
# # THISMAKE !:= $(_COMPILER):$(_MODEL):$(LNG):$(null,$(NDEBUG) DBG NDBG):$(LNG)
# Default target
all: com.com tools
.INIT .PHONY .SEQUENTIAL : verscheck $(CFG) __errl tags
tags :
ctags cmd\*.c lib\*.c shell\*.c
.IF $(THISMAKE) == $(LASTMAKE)
verscheck :;
.ELSE
verscheck :
@+-echo Changed Make parameters, already made files invalid!
+-echo LASTMAKE = $(THISMAKE) >lastmake.mk
$(RUNMAKE) clobber
.IF $(CFG)
$(RUNMAKE) $(CFG)
.ENDIF
.ENDIF
__errl:
@+-if exist errlist del errlist >nul
# -ctags *.c
com.com .SEQUENTIAL : utils strings criter lib cmd shell\\com.exe infores
@+copy /b shell\\com.exe + infores + criter\\criter + criter\\criter1 + strings\\strings.dat $@
infores : config.h include/command.h shell\\com.exe shell/com.map
utils\mkinfres.exe /[email protected] $@ shell\\com.map shell\\com.exe
context : criter
shell\\com.exe : shell
subdirs.mk : makefile
perl mksubmk.pl >$@
.INCLUDE : subdirs.mk
err_fcts.h : lib\\err_fcts.src lib\\efct_*.c ; perl lib\\scanerr.pl lib\\err_fcts.src lib\\efct_*.c >$@
#MAKEDEP START
#MAKEDEP STOP
clobber : $(CLOBBER_DEPENDENCIES) my_clean
$(RM) $(RMFLAGS) *.com *.cln subdirs.mk err_fcts.h *.cfg
clean : $(CLEAN_DEPENDENCIES)
dist : err_fcts.h utils $(DIST_DEPENDENCIES)
command.lsm : command.com
perl get_vers.pl $<
my_clean :
$(RM) $(RMFLAGS) *.lst *.map *.bin *.bak *.las *.obj *.exe $(CFG) *.dmp
$(RM) $(RMFLAGS) strings.dat strings.h context.h_c criter1 criter2 context.inc infores
doc .SETDIR=docs/html/commands :
upd_html.bat