source: trunk/src/win16ldr/watcom.mak@ 10366

Last change on this file since 10366 was 5980, checked in by bird, 24 years ago

Some corrections.

File size: 1.9 KB
Line 
1# $Id: watcom.mak,v 1.2 2001-06-13 02:55:19 bird Exp $
2
3#
4# Watcom v11.0 makefile.
5#
6#
7
8
9#
10# 16-bit compiler and stuff.
11#
12CC = wcc
13!ifdef DEBUG
14CCFLAGS = -ml -zq -zw -w4 -I$(WATCOM)\h\win -I$(WATCOM)\h -I. -d3 -d_DEBUG
15!else
16CCFLAGS = -ml -zq -zw -w4 -I$(WATCOM)\h\win -I$(WATCOM)\h -I. -dNDEBUG
17!endif
18CCFLAGS_EXE = $(CCFLAGS) -bw
19CCFLAGS_DLL = $(CCFLAGS) -bd
20
21LD = wlink
22!ifdef DEBUG
23LDFLAGS = Debug Codeview All
24!else
25LDFLAGS =
26!endif
27
28
29#
30# Work according to existing environment.
31#
32!ifdef DEBUG
33OBJDIR=.\bin\debug.wc16
34!else
35OBJDIR=.\bin\release.wc16
36!endif
37!if [ mkdir bin 2> nul > nul ]
38!endif
39!if [ mkdir $(OBJDIR) 2> nul > nul ]
40!endif
41
42#
43# The all rule.
44#
45all: $(OBJDIR)\w16odin.exe $(OBJDIR)\odindll.dll
46
47
48#
49# W16Odin.EXE.
50#
51w16odin.exe: $(OBJDIR)\w16odin.exe
52$(OBJDIR)\w16odin.exe: $(OBJDIR)\odin.obj watcom.mak
53 $(LD) @<<$(OBJDIR)\$(@B).lnk
54Name $@
55$(LDFLAGS)
56File {$(OBJDIR)\odin.obj}
57LibPath $(WATCOM)\lib286\win
58LibPath $(WATCOM)\lib286
59Library {windows shell}
60
61Format Windows
62Option Map=$(@R).map
63Option Heapsize=1024
64Option Description 'W16Odin.EXE - WinOS2 Hack.'
65Segment Type CODE SHARED
66Segment Type DATA SHARED
67<<keep
68
69
70#
71# OdinDLL.DLL.
72#
73odindll.dll: $(OBJDIR)\odindll.dll
74$(OBJDIR)\odindll.dll: $(OBJDIR)\odindll.obj watcom.mak
75 $(LD) @<<$(OBJDIR)\$(@B).lnk
76Name $@
77$(LDFLAGS)
78File {$(WATCOM)\lib286\win\libentry.obj $(OBJDIR)\odindll.obj}
79LibPath $(WATCOM)\lib286\win
80LibPath $(WATCOM)\lib286
81Library {windows shell}
82
83Format Windows DLL
84Option Map=$(@R).map
85Option Heapsize=1024
86Option Description 'OdinDll.DLL - WinOS2 Hack.'
87Segment Type CODE SHARED
88Segment Type DATA SHARED
89Export MYGETVERSION.1, MYWINEXEC.2
90<<keep
91
92
93#
94# Rule for executable objects.
95#
96$(OBJDIR)\odin.obj odin.obj: $(@B).c
97 $(CC) $(CCFLAGS_EXE) -fo$(OBJDIR)\$(@F) $**
98
99#
100# Rule for dll objects.
101#
102$(OBJDIR)\odindll.obj odindll.obj: $(@B).c
103 $(CC) $(CCFLAGS_DLL) -fo$(OBJDIR)\$(@F) $**
104
Note: See TracBrowser for help on using the repository browser.