]> git.saurik.com Git - wxWidgets.git/blob - src/makeprog.wat
more informative error messages
[wxWidgets.git] / src / makeprog.wat
1 WXDIR = $(%WXWIN)
2
3 !include $(WXDIR)\src\makewat.env
4
5 WXLIB = $(WXDIR)\lib
6 LNK = $(OUTPUTDIR)$(PROGRAM).lnk
7
8 all: $(OUTPUTDIR) $(OUTPUTDIR)$(PROGRAM).exe $(EXTRATARGETS) .SYMBOLIC
9
10 $(OUTPUTDIR):
11 @if not exist $^@ mkdir $^@
12
13 !ifeq wxUSE_GUI 0
14 RESFILE=
15 !else
16 RESFILE=$(OUTPUTDIR)$(PROGRAM).res
17 !endif
18
19 $(OUTPUTDIR)$(PROGRAM).exe : $(OBJECTS) $(RESFILE) $(LNK) $(WXLIB)\$(LIBNAME).lib
20 wlink @$(LNK)
21 !ifneq wxUSE_GUI 0
22 $(BINDCOMMAND) $(RESFILE)
23 !endif
24
25 !ifneq wxUSE_GUI 0
26 $(RESFILE): $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc
27 $(RC) $(RESFLAGS) /fo=$(RESFILE) $(PROGRAM).rc
28 !endif
29
30 $(LNK) : makefile.wat
31 %create $(LNK)
32 @%append $(LNK) $(LDFLAGS)
33 @%append $(LNK) $(DEBUGINFO)
34 @%append $(LNK) system $(LINKSYSTEM)
35 @%append $(LNK) $(STACK)
36 @%append $(LNK) name $(OUTPUTDIR)$(PROGRAM).exe
37 @for %i in ($(OBJECTS)) do @%append $(LNK) file %i
38 @for %i in ($(LIBS)) do @%append $(LNK) lib %i
39 @for %i in ($(EXTRALIBS)) do @%append $(LNK) lib %i
40
41 clean: .SYMBOLIC
42 -erase $(OUTPUTDIR)*.obj
43 -erase $(OUTPUTDIR)*.bak
44 -erase $(OUTPUTDIR)*.err
45 -erase $(OUTPUTDIR)*.pch
46 -erase $(OUTPUTDIR)*.lib
47 -erase $(LNK)
48 -erase $(OUTPUTDIR)*.res
49 -erase $(OUTPUTDIR)*.exe
50 -erase $(OUTPUTDIR)*.lbc
51 -rmdir $(OUTPUTDIR)
52