]>
Commit | Line | Data |
---|---|---|
2bda0e17 KB |
1 | # File: makewat.env |
2 | # Purpose: Watcom environments for wxWindows makefiles. | |
3 | # Author: Julian Smart and others | |
4 | # | |
5 | # The main things to change are: | |
6 | # | |
7 | # WATCOM: set to where the compiler is installed | |
8 | # WXDIR: set to where the wxWindows is installed | |
9 | # MODE: set to windows [16 bit windows], nt [win32s], or win386 [32-bit non-WIN32] | |
10 | ||
11 | FINAL=0 | |
12 | WATCOMDIR=$(%WATCOM) | |
2bda0e17 | 13 | |
7be1f0d9 JS |
14 | .EXTENSIONS: |
15 | .EXTENSIONS: .exe .obj .c .cc .cpp .res .rc .def | |
2bda0e17 | 16 | |
7be1f0d9 JS |
17 | #WXDIR = d:\wx2\wxwind~1 |
18 | WXDIR = $(%WXWIN) | |
19 | WXINC = $(WXDIR)\include | |
2bda0e17 KB |
20 | |
21 | # Suffixes | |
22 | OBJSUFF=obj | |
23 | SRCSUFF=cpp | |
24 | ||
b2aef89b | 25 | WXDEBUG=0 |
2bda0e17 KB |
26 | |
27 | !ifneq NOPRECOMP 1 | |
28 | PRECOMP = /fh=$(WXDIR)\src\msw\watcom.pch | |
29 | !endif | |
30 | ||
7be1f0d9 | 31 | !ifeq WXDEBUG 1 |
f6bcfd97 | 32 | DEBUGFLAGS = /D__WXDEBUG__ /o1 |
2bda0e17 | 33 | DEBUGINFO = debug all |
7be1f0d9 JS |
34 | !else |
35 | DEBUGFLAGS = | |
36 | DEBUGINFO = | |
2bda0e17 | 37 | !endif |
2bda0e17 | 38 | |
7be1f0d9 | 39 | RC = wrc |
2bda0e17 KB |
40 | |
41 | LEVEL = 386 | |
42 | CCC = wpp$(LEVEL) | |
43 | CC = wcc$(LEVEL) | |
44 | OS_TARGET = nt_win | |
45 | MODEL = | |
46 | # If you use win95, assumptions will be made about Win95 icon format etc. | |
47 | # so nt_win is probably better for simultaneous Win32s/Win95/NT operation. | |
48 | LINKOPTION = nt_win # win95 | |
810aa7fc | 49 | WINVERFLAGS = /dWINVER=0x400 /d__WIN95__ |
2bda0e17 KB |
50 | BINDCOMMAND = wrc |
51 | WATLIBDIR = $(WATCOMDIR)\lib386\nt | |
52 | MINDATA = | |
53 | MAXDATA = | |
54 | STACK = option stack=64k | |
08e0d1cc | 55 | LIBS = $(WXDIR)\lib\wx.lib $(WXDIR)\lib\regex.lib $(WXDIR)\lib\zlib.lib $(WXDIR)\lib\png.lib $(WXDIR)\lib\tiff.lib $(WXDIR)\lib\jpeg.lib & |
0a240683 | 56 | $(WATLIBDIR)\comctl32.lib $(WATLIBDIR)\comdlg32.lib & |
f6bcfd97 | 57 | $(WATLIBDIR)\ole32.lib $(WATLIBDIR)\oleaut32.lib $(WATLIBDIR)\opengl32.lib & |
ace03f87 | 58 | $(WATLIBDIR)\uuid.lib $(WXDIR)\lib\watcom\odbc32.lib |
810aa7fc VS |
59 | IFLAGS = -i=$(WXDIR)\lib\msw -i=$(WXINC) -i=$(WXDIR)\contrib\include -i=$(%watcom)\h;$(%watcom)\h\nt;$(WXDIR)\src\regex;$(WXDIR)\src\png;$(WXDIR)\src\zlib;$(WXDIR)\src\jpeg;$(WXDIR)\src\tiff;$(WXDIR)\include\wx\msw\gnuwin32 |
60 | RESFLAGS1 = -r -bt=nt /i$(WXDIR)\include /i$(WXDIR)\contrib\include $(WINVERFLAGS) | |
61 | RESFLAGS2 = -R $(name) /i$(WXDIR)\include /i$(WXDIR)\contrib\include $(WINVERFLAGS) | |
2bda0e17 KB |
62 | |
63 | # Here are some possible optimization flags: | |
64 | # /5r Pentium timings | |
65 | # /fp5 /fpi87 Inline 80x87 instructions optimized for Pentium: coprocessor must be present | |
66 | # /ox Standard optimizations | |
67 | # /or Reordering for Pentium timings (included in /ox) | |
68 | # The Watcom-recommended flags for optimum Pentium speed are: | |
69 | # /oneatx /zp4 /5 /fpi87 /fp5 | |
70 | ||
7be1f0d9 | 71 | OPTFLAGS=/ox /5r |
2bda0e17 KB |
72 | |
73 | # /d1 for line numbers only: anything else produces an enormous wx32.lib | |
9f51f2b6 VZ |
74 | # |
75 | # NB: /bm switch is needed for thread-safe runtime, if you don't use | |
76 | # wxThread you may remove it | |
810aa7fc | 77 | CPPFLAGS = /bt=nt /w1 /DWIN32 /bm /zq $(OPTFLAGS) $(MODEL) $(PRECOMP) $(DEBUGFLAGS) /d__WXMSW__ $(WINVERFLAGS) $(EXTRACPPFLAGS) # /d__WATCOMC__ |
2bda0e17 KB |
78 | |
79 | .cpp.obj: # $< # .AUTODEPEND | |
80 | *$(CCC) $(CPPFLAGS) $(IFLAGS) $< | |
81 | ||
2bda0e17 KB |
82 | .c.obj: # $< # .AUTODEPEND |
83 | *$(CC) $(CPPFLAGS) $(IFLAGS) $< | |
84 | ||
85 | # This doesn't work for wcc | |
86 | # %create tmp.lbc | |
87 | # @%append tmp.lbc $(CPPFLAGS) $(IFLAGS) $< | |
88 | # echo $< | |
89 | # $(CC) @tmp.lbc | |
90 | ||
91 | dummy: .SYMBOLIC | |
92 | @echo Please give a target for wxWin makefiles: the usual one is 'all'. | |
93 | ||
94 | erasepch: .SYMBOLIC | |
95 | -erase $(WXDIR)\src\msw\watcom.pch |