]> git.saurik.com Git - wxWidgets.git/blame - src/makeprog.wat
avoid buffer overrun
[wxWidgets.git] / src / makeprog.wat
CommitLineData
ddea7eb6
CE
1#
2# Changelist: 2003-02-25 - Juergen Ulbts - update from wxWindows 2.5.x/HEAD branch
3#
4# $+ .. $- means we get the result directly
5THISDIR = $+ $(%cdrive):$(%cwd) $-
6
7be1f0d9 7WXDIR = $(%WXWIN)
ddea7eb6
CE
8!ifndef EXEDIR
9OUTPUTDIR = $(THISDIR)\Watcom
10!else
11OUTPUTDIR = $(THISDIR)\$(EXEDIR)
12!ifeq EXEDIR "."
13OUTPUTDIR = $(THISDIR)
14!endif
15!endif
7be1f0d9
JS
16
17!include $(WXDIR)\src\makewat.env
18
19WXLIB = $(WXDIR)\lib
ddea7eb6 20LNK = $(OUTPUTDIR)\$(PROGRAM).lnk
7be1f0d9 21
ddea7eb6 22all: MAKEDIR $(OUTPUTDIR)\$(PROGRAM).exe $(EXTRATARGETS) .SYMBOLIC
7be1f0d9 23
ddea7eb6
CE
24MAKEDIR: .SYMBOLIC
25 @if not exist $(OUTPUTDIR) mkdir $(OUTPUTDIR)
a0499e2f
VZ
26
27!ifeq wxUSE_GUI 0
28RESFILE=
29!else
ddea7eb6 30RESFILE=$(OUTPUTDIR)\$(PROGRAM).res
a0499e2f
VZ
31!endif
32
ddea7eb6 33$(OUTPUTDIR)\$(PROGRAM).exe : $(OBJECTS) $(RESFILE) $(LNK) $(WXLIB)\$(LIBNAME).lib
7be1f0d9 34 wlink @$(LNK)
a0499e2f
VZ
35!ifneq wxUSE_GUI 0
36 $(BINDCOMMAND) $(RESFILE)
37!endif
7be1f0d9 38
a0499e2f
VZ
39!ifneq wxUSE_GUI 0
40$(RESFILE): $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc
41 $(RC) $(RESFLAGS) /fo=$(RESFILE) $(PROGRAM).rc
42!endif
7be1f0d9 43
ddea7eb6 44$(LNK) : .SYMBOLIC
7be1f0d9 45 %create $(LNK)
205b0c9c 46 @%append $(LNK) $(LDFLAGS)
a0499e2f 47 @%append $(LNK) $(DEBUGINFO)
205b0c9c 48 @%append $(LNK) system $(LINKSYSTEM)
7be1f0d9 49 @%append $(LNK) $(STACK)
ddea7eb6 50 @%append $(LNK) name $(OUTPUTDIR)\$(PROGRAM).exe
7be1f0d9 51 @for %i in ($(OBJECTS)) do @%append $(LNK) file %i
9e9b65c1
JS
52 @for %i in ($(LIBS)) do @%append $(LNK) lib %i
53 @for %i in ($(EXTRALIBS)) do @%append $(LNK) lib %i
7be1f0d9
JS
54
55clean: .SYMBOLIC
ddea7eb6
CE
56 -erase $(OUTPUTDIR)\*.obj
57 -erase $(OUTPUTDIR)\*.bak
58 -erase $(OUTPUTDIR)\*.err
59 -erase $(OUTPUTDIR)\*.pch
60 -erase $(OUTPUTDIR)\*.lib
ce3ed50d 61 -erase $(LNK)
ddea7eb6
CE
62 -erase $(OUTPUTDIR)\*.res
63 -erase $(OUTPUTDIR)\*.exe
64 -erase $(OUTPUTDIR)\*.lbc
a0499e2f 65 -rmdir $(OUTPUTDIR)
7be1f0d9 66