root/trunk/txlib/makefile.mif

Revision 14, 4.8 kB (checked in by jvw, 2 years ago)

HEX/ASCII (sector) editor control added

Line 
1#
2# TXLIB master makefile, to build with 32-bit compiler; many different targets
3#
4# JvW 06-06-2002 Initial version, derived from WATCOM JvW TEST project
5# JvW 13-04-2003 Updated to use AUTODEPEND for .h includes
6# JvW 15-01-2004 Use consistent r/d/t postfixes for the 3 variants
7# JvW 04-03-2004 Moved includes to ..\include and libs to ..\lib, added Linux
8# JvW 02-12-2004 Moved targets to 2nd level subdir, for OEM/special versions
9# JvW 24-07-2005 Moved LZW and REG modules to DFSee specific (no open source)
10# JvW 24-07-2005 Split some sources to improve modularity (smaller executables)
11#
12# Usage: Include this from 2nd level subdirectory with a 'makefile' that set the
13#        various environmental variables like 'target_os' and 'target_env'
14
15# define main component name (not an EXE here but a LIB)
16compo   = tx
17
18cc = wcc386
19
20# allow (> 2 times) faster building by using the DLL versions from wmake
21!ifdef __LOADDLL__
22!  loaddll wcc386  wccd386
23!  loaddll wlink   wlink
24!  loaddll wlib    wlibd
25!endif
26
27!ifndef tx_version
28tx_version = _txall_
29!endif
30!ifneq tx_version _txall_
31cflags += -DTXMIN
32!endif
33
34
35txinc   = ..\..\include
36
37cflags += -bt=$(target_os) -ef -wx -zc -zp1 -zq
38libopt += -b -n
39postfix =
40
41
42!ifeq  target_env debug
43cflags += -d2
44#activate next line to remove trace from debug EXE (update dfsee makefile too)
45#cflags += -DNOTRACE
46lnkopt += debug all
47postfix = d
48!else
49cflags += -d1
50lnkopt += option symfile
51!ifeq  target_env trace
52postfix = t
53!else
54postfix = r
55cflags += -DNOTRACE
56!endif
57#select optimization for the non-debug (t and r) versions
58!ifeq target_os linux
59cflags += -ormile
60!else
61cflags += -oneasx
62!endif
63!endif
64
65!ifeq target_os nt
66cflags += -bm -ei
67lnkopt += libpath $(%wintklib)
68bintype = win
69!endif
70
71!ifeq target_os os2
72cflags += -bm
73lnkopt += libpath $(%os2tklib)
74bintype = os2
75!endif
76
77!ifeq target_os linux
78lnkopt += libpath $(%lintklib)
79bintype = lin
80!endif
81
82!ifeq target_os dos
83!ifeq target_sys dos32a
84bintype = dos
85!else
86cflags += -DCAUSEWAY
87bintype = dcw
88!endif
89!endif
90
91gendep = makefile ..\..\makefile.mif
92
93.EXTENSIONS:
94.EXTENSIONS: .exe .lib .obj .c .h
95
96.c : ..\..
97.h : ..\..;$(txinc)
98
99.c.obj : .AUTODEPEND $(gendep)
100      $(cc) $[*.c $(cflags)
101
102libbase = ..\lib\$(compo)$(bintype)
103libname = $(libbase)$(postfix).lib
104
105all : $(libname) .SYMBOLIC
106
107#list all object files to create a full dependancy list for the lib
108libdeps = &
109 txlib.obj    txparse.obj  txparse2.obj txboot.obj   txcrc32.obj  &
110 txcon.obj    txcon2.obj   txcon3.obj                txcrclvm.obj &
111 txextcmd.obj txlogfil.obj txscript.obj              txafail.obj  &
112 txfsys.obj   txunico.obj  txfiles.obj  txwildc.obj  txcrite.obj  &
113 txfexist.obj txfpath.obj  txmpath.obj  txtname.obj  txwiop.obj   &
114 txstdcmd.obj txtrace.obj  txtrace2.obj txtree.obj   txutil.obj   &
115 txstring.obj txosver.obj  txstrlst.obj txstrtxt.obj txstrnum.obj &
116 txfsattr.obj txosapi.obj  txstrsiz.obj txswap.obj   txdisp.obj   &
117 txfmtmix.obj txmemstr.obj txfname.obj  txfnext.obj
118
119# list all objects to be part of the library
120libspec = &
121 +txlib       +txparse     +txparse2    +txboot      +txcrc32     &
122 +txcon       +txcon2      +txcon3                   +txcrclvm    &
123 +txextcmd    +txlogfil    +txscript                 +txafail     &
124 +txfsys      +txunico     +txfiles     +txwildc     +txcrite     &
125 +txfexist    +txfpath     +txmpath     +txtname     +txwiop      &
126 +txstdcmd    +txtrace     +txtrace2    +txtree      +txutil      &
127 +txstring    +txosver     +txstrlst    +txstrtxt    +txstrnum    &
128 +txfsattr    +txosapi     +txstrsiz    +txswap      +txdisp      &
129 +txfmtmix    +txmemstr    +txfname     +txfnext
130
131# define the windowing stuff conditionally
132!ifeq tx_version txmin
133windeps=
134winspec=
135!else
136windeps= &
137 txwdraw.obj  txwhelp.obj  txwikey.obj  txwind.obj   txwutil.obj  &
138 txwprint.obj txwproc.obj  txwstdlg.obj txwidget.obj txselist.obj &
139 txwmsg.obj   txwehook.obj txwhexed.obj
140winspec= &
141 +txwdraw     +txwhelp     +txwikey     +txwind      +txwutil     &
142 +txwprint    +txwproc     +txwstdlg    +txwidget    +txselist    &
143 +txwmsg      +txwehook    +txwhexed
144!endif
145
146$(libname) : $(gendep)      $(libdeps) $(windeps)
147      @%create $(compo).lbc
148      @%append $(compo).lbc $(libname)
149      @%append $(compo).lbc $(libspec) $(winspec)
150      wlib $(libopt) @$(compo).lbc
151
152nolib : .SYMBOLIC
153        @if exist $(libname) del $(libname)
154        @if exist *.obj del *.obj
155        @if exist *.lbc del *.lbc
156        @if exist *.err del *.err
157        @if exist *.lst del *.lst
158        @if exist *.map del *.map
159
160clean : .SYMBOLIC
161        @if exist *.obj del *.obj
162        @if exist *.lbc del *.lbc
163        @if exist *.err del *.err
164        @if exist *.lst del *.lst
165        @if exist *.map del *.map
Note: See TracBrowser for help on using the browser.