root/trunk/txt/makefile.mif

Revision 1, 3.0 kB (checked in by jvw, 3 years ago)

Initial check-in for TxWin? version 1.02 sources

Line 
1#
2# Sample makefile, to build with 32-bit compiler; 12 different targets!
3#
4# JvW 06-07-2003 Renamed to TXT, TX-library test program
5# JvW 06-06-2002 called from subdirectory, compile using sources in ..
6# JvW 10-03-2004 Moved includes to txlib\include, libs to txlib\lib, added Linux
7# JvW 29-09-2005 Minor updates for Open TxWindows release 1.0
8#
9
10# define main component name
11compo   = txt
12
13cc = wcc386
14
15# allow (> 2 times) faster building by using the DLL versions from wmake
16!ifdef __LOADDLL__
17!  loaddll wcc386  wccd386
18!  loaddll wlink   wlink
19!  loaddll wlib    wlibd
20!endif
21
22!ifndef tx_version
23tx_version = _txall_
24!endif
25!ifneq tx_version _txall_
26cflags += -DTXOEM -DOEMSV
27!endif
28
29txdir   = ..\..\txlib\$(tx_version)\lib
30txinc   = ..\..\txlib\include
31
32cflags += -bt=$(target_os) -ef -wx -zc -zp1 -zq
33lnkopt += option map option stack=128K libpath $(txdir)
34postfix =
35comprs  = rem
36
37!ifeq  target_env debug
38cflags += -d2
39#activate next line to remove trace from debug EXE (update txlib makefile too)
40#cflags += -DNOTRACE
41lnkopt += debug all
42postfix = d
43!else
44!ifeq  target_env trace
45postfix = t
46!else
47postfix = r
48#activate next line to remove ALL trace from EXE (not just from TXLIB)
49#cflags += -DNOTRACE
50!endif
51#select optimization for the non-debug (t and r) versions
52cflags += -ormile
53#cflags += -oneasx
54#cflags += -od
55!endif
56
57!ifeq target_os nt
58cflags += -bm -ei
59lnkopt += libpath $(%wintklib)
60bintype = win
61comprs  = upx --best
62!endif
63
64!ifeq target_os os2
65cflags += -bm
66lnkopt += libpath $(%os2tklib)
67bintype = os2
68comprs  = lxlite
69!endif
70
71!ifeq target_os linux
72lnkopt += libpath $(%lintklib)
73bintype = lin
74comprs  = upx --best
75!endif
76
77!ifeq target_os dos
78!ifeq target_sys dos32a
79bintype = dos
80!else
81bintype = dcw
82!endif
83comprs  = upx --best
84!endif
85
86gendep = makefile ..\makefile.mif
87
88.EXTENSIONS:
89.EXTENSIONS: .exe .lib .obj .c .h
90
91.c : ..
92.h : ..;$(txinc)
93
94.c.obj : .AUTODEPEND $(gendep)
95      $(cc) $[*.c $(cflags)
96
97exebase = ..\$(compo)$(bintype)
98exename = $(exebase)$(postfix).exe
99
100all : $(exename) .SYMBOLIC
101
102#list all object files to create a full dependancy list for the exe
103exedeps =                            &
104           $(compo).obj              &
105           txtwin.obj
106
107# add any objects and libraries needed beyond the component itself
108lnkspec =                            &
109 name      $(exename)                &
110 library tx$(bintype)$(postfix).lib  &
111 file      $(compo)                  &
112 file      txtwin
113
114$(exename)   : $(exedeps) $(gendep) $(txdir)\tx$(bintype)$(postfix).lib
115      @%create $(compo).lnk
116      @%append $(compo).lnk system $(target_sys) $(lnkopt)
117      @%append $(compo).lnk $(lnkspec)
118      wlink $(lnkopt) @$(compo).lnk
119!ifeq  target_env debug
120!else
121      - $(comprs)  $^@
122!endif
123
124clean : .SYMBOLIC
125        @if exist $(exename) del $(exename)
126        @if exist *.obj del *.obj
127        @if exist *.lnk del *.lnk
128        @if exist *.err del *.err
129        @if exist *.map del *.map
130        @if exist *.lst del *.lst
Note: See TracBrowser for help on using the browser.