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 | #
|
---|
12 | CC = wcc
|
---|
13 | !ifdef DEBUG
|
---|
14 | CCFLAGS = -ml -zq -zw -w4 -I$(WATCOM)\h\win -I$(WATCOM)\h -I. -d3 -d_DEBUG
|
---|
15 | !else
|
---|
16 | CCFLAGS = -ml -zq -zw -w4 -I$(WATCOM)\h\win -I$(WATCOM)\h -I. -dNDEBUG
|
---|
17 | !endif
|
---|
18 | CCFLAGS_EXE = $(CCFLAGS) -bw
|
---|
19 | CCFLAGS_DLL = $(CCFLAGS) -bd
|
---|
20 |
|
---|
21 | LD = wlink
|
---|
22 | !ifdef DEBUG
|
---|
23 | LDFLAGS = Debug Codeview All
|
---|
24 | !else
|
---|
25 | LDFLAGS =
|
---|
26 | !endif
|
---|
27 |
|
---|
28 |
|
---|
29 | #
|
---|
30 | # Work according to existing environment.
|
---|
31 | #
|
---|
32 | !ifdef DEBUG
|
---|
33 | OBJDIR=.\bin\debug.wc16
|
---|
34 | !else
|
---|
35 | OBJDIR=.\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 | #
|
---|
45 | all: $(OBJDIR)\w16odin.exe $(OBJDIR)\odindll.dll
|
---|
46 |
|
---|
47 |
|
---|
48 | #
|
---|
49 | # W16Odin.EXE.
|
---|
50 | #
|
---|
51 | w16odin.exe: $(OBJDIR)\w16odin.exe
|
---|
52 | $(OBJDIR)\w16odin.exe: $(OBJDIR)\odin.obj watcom.mak
|
---|
53 | $(LD) @<<$(OBJDIR)\$(@B).lnk
|
---|
54 | Name $@
|
---|
55 | $(LDFLAGS)
|
---|
56 | File {$(OBJDIR)\odin.obj}
|
---|
57 | LibPath $(WATCOM)\lib286\win
|
---|
58 | LibPath $(WATCOM)\lib286
|
---|
59 | Library {windows shell}
|
---|
60 |
|
---|
61 | Format Windows
|
---|
62 | Option Map=$(@R).map
|
---|
63 | Option Heapsize=1024
|
---|
64 | Option Description 'W16Odin.EXE - WinOS2 Hack.'
|
---|
65 | Segment Type CODE SHARED
|
---|
66 | Segment Type DATA SHARED
|
---|
67 | <<keep
|
---|
68 |
|
---|
69 |
|
---|
70 | #
|
---|
71 | # OdinDLL.DLL.
|
---|
72 | #
|
---|
73 | odindll.dll: $(OBJDIR)\odindll.dll
|
---|
74 | $(OBJDIR)\odindll.dll: $(OBJDIR)\odindll.obj watcom.mak
|
---|
75 | $(LD) @<<$(OBJDIR)\$(@B).lnk
|
---|
76 | Name $@
|
---|
77 | $(LDFLAGS)
|
---|
78 | File {$(WATCOM)\lib286\win\libentry.obj $(OBJDIR)\odindll.obj}
|
---|
79 | LibPath $(WATCOM)\lib286\win
|
---|
80 | LibPath $(WATCOM)\lib286
|
---|
81 | Library {windows shell}
|
---|
82 |
|
---|
83 | Format Windows DLL
|
---|
84 | Option Map=$(@R).map
|
---|
85 | Option Heapsize=1024
|
---|
86 | Option Description 'OdinDll.DLL - WinOS2 Hack.'
|
---|
87 | Segment Type CODE SHARED
|
---|
88 | Segment Type DATA SHARED
|
---|
89 | Export 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 |
|
---|