]> git.saurik.com Git - wxWidgets.git/blame_incremental - src/makeprog.wat
compilation fix for Mac and reformatted the code
[wxWidgets.git] / src / makeprog.wat
... / ...
CommitLineData
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
7WXDIR = $(%WXWIN)
8!ifndef EXEDIR
9OUTPUTDIR = $(THISDIR)\Watcom
10!else
11OUTPUTDIR = $(THISDIR)\$(EXEDIR)
12!ifeq EXEDIR "."
13OUTPUTDIR = $(THISDIR)
14!endif
15!endif
16
17!include $(WXDIR)\src\makewat.env
18
19WXLIB = $(WXDIR)\lib
20LNK = $(OUTPUTDIR)\$(PROGRAM).lnk
21
22all: MAKEDIR $(OUTPUTDIR)\$(PROGRAM).exe $(EXTRATARGETS) .SYMBOLIC
23
24MAKEDIR: .SYMBOLIC
25 @if not exist $(OUTPUTDIR) mkdir $(OUTPUTDIR)
26
27!ifeq wxUSE_GUI 0
28RESFILE=
29!else
30RESFILE=$(OUTPUTDIR)\$(PROGRAM).res
31!endif
32
33$(OUTPUTDIR)\$(PROGRAM).exe : $(OBJECTS) $(RESFILE) $(LNK) $(WXLIB)\$(LIBNAME).lib
34 wlink @$(LNK)
35!ifneq wxUSE_GUI 0
36 $(BINDCOMMAND) $(RESFILE)
37!endif
38
39!ifneq wxUSE_GUI 0
40$(RESFILE): $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc
41 $(RC) $(RESFLAGS) /fo=$(RESFILE) $(PROGRAM).rc
42!endif
43
44$(LNK) : .SYMBOLIC
45 %create $(LNK)
46 @%append $(LNK) $(LDFLAGS)
47 @%append $(LNK) $(DEBUGINFO)
48 @%append $(LNK) system $(LINKSYSTEM)
49 @%append $(LNK) $(STACK)
50 @%append $(LNK) name $(OUTPUTDIR)\$(PROGRAM).exe
51 @for %i in ($(OBJECTS)) do @%append $(LNK) file %i
52 @for %i in ($(LIBS)) do @%append $(LNK) lib %i
53 @for %i in ($(EXTRALIBS)) do @%append $(LNK) lib %i
54
55clean: .SYMBOLIC
56 -erase $(OUTPUTDIR)\*.obj
57 -erase $(OUTPUTDIR)\*.bak
58 -erase $(OUTPUTDIR)\*.err
59 -erase $(OUTPUTDIR)\*.pch
60 -erase $(OUTPUTDIR)\*.lib
61 -erase $(LNK)
62 -erase $(OUTPUTDIR)\*.res
63 -erase $(OUTPUTDIR)\*.exe
64 -erase $(OUTPUTDIR)\*.lbc
65 -rmdir $(OUTPUTDIR)
66