-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMAKEFILE
136 lines (116 loc) · 4.32 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
.AUTODEPEND
##############################################################################
## ##
## Async Tools for the Async Minded ##
## ================================ ##
## v0.50 -- Copyright(C) 1993, by Scott A. Deming -- ALL RIGHTS RESERVED! ##
## ##
## Special thanks to: Chris Blum for his Summary on Serial Ports ##
## ##
## -- NOTE -- THIS IS A VERY INCOMPLETE PACKAGE -- SEE TODO.DOC ##
## ##
##############################################################################
## ##
## MAKE clean : Clean up around the house. Deletes *.BAK, *.OBJ, ##
## TERM.EXE, and ASYNCLIB.LIB. ##
## ##
## MAKE asynclib : Compiles all of the source files and creates a lib ##
## file for easy linkage. ##
## ##
## MAKE term : Builds just the terminal program that comes with the ##
## library. ##
## ##
## MAKE all : makes asynclib.lib, and builds the terminal program ##
## term.exe. ##
## ##
## MAKE fresh : cleans, makes all ##
## ##
##############################################################################
## Define DOS extender here
## "DOSX286" -- Compile for Phar Lap 286|DOS-EXTENDER.
## SDK Required.
EXTENDER= ""
## Define the include and library directories here
##
INCLUDE= \borlandc\include;\run286\inc
LIB= \borlandc\lib;\run286\bc3\lib
## Set DEBUG to -v if you want to use Turbo Debugger with this library.
##
DEBUG= -v
## Set MODEL to -ml for large memory model
## -ml is all thats been tested as of now.
## Please let me know if you test it with any other models, I currently only
## have my compiler set up to allow large model.
##
MODEL= -ml
## Define compiler here
## BORLANDC
## TURBOC -- Untested
## MSC -- Untested
## POWERC -- See ASYNCLIB.PRJ, that should do the trick.
##
COMPILER= BORLANDC
## Define the compiler executable here
## tcc
## bcc
## cl
##
CC= @bcc
## Compiler command line parameters.
##
!if $(EXTENDER) == "DOSX286"
CFLAGS= $(MODEL) $(DEBUG) -DDOSX286 -D$(COMPILER) -r- -2 -w -I$(INCLUDE) -L$(LIB)
!else
CFLAGS= $(MODEL) $(DEBUG) -D$(COMPILER) -r- -2 -w -I$(INCLUDE) -L$(LIB)
!endif
## Define the linker executable here
## tlink -- Turbo Link
##
LINK= @tlink
## Linker command line paramaters.
##
!if $(EXTENDER) == "DOSX286"
LNFLAGS= /x/n/c/C/P-/L$(LIB)
!else
LNFLAGS= /x/n/c/C/P-/L$(LIB)
!endif
## Linker list file.
##
!if $(EXTENDER) == "DOSX286"
LLFILE= ASYNCPL.LNK
!else
LLFILE= ASYNCLIB.LNK
!endif
## Define the library executable here
## tlib -- Turbo/Borland C
## lib -- MicroSoft C
##
LIBRARY= @tlib
## LIBRARY command line parameters.
##
LFLAGS= -+$&
## Objects to put in the library.
##
OBJS= async.obj setuart.obj detect.obj isr.obj fifo.obj line.obj \
asyio.obj hshake.obj
.c.obj :
$(CC) -c $(CFLAGS) $<
$(LIBRARY) asynclib $(LFLAGS)
help:
@cls
@echo Make FRESH cleans up, and makes all.
@echo Make ALL makes everything.
@echo Make CLEAN cleans up.
@echo Make ASYNCLIB makes ASYNCLIB.LIB.
@echo Make TERM makes the terminal program.
fresh: clean all
all: asynclib term
clean:
del *.obj
del *.bak
del asynclib.lib
del term.exe
asynclib: $(OBJS)
term:
$(CC) $(CFLAGS) -c term.c asynclib.lib
$(LINK) $(LNFLAGS) @$(LLFILE)