]>
Commit | Line | Data |
---|---|---|
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 | |
5 | THISDIR = $+ $(%cdrive):$(%cwd) $- | |
6 | ||
7be1f0d9 | 7 | WXDIR = $(%WXWIN) |
ddea7eb6 CE |
8 | !ifndef EXEDIR |
9 | OUTPUTDIR = $(THISDIR)\Watcom | |
10 | !else | |
11 | OUTPUTDIR = $(THISDIR)\$(EXEDIR) | |
12 | !ifeq EXEDIR "." | |
13 | OUTPUTDIR = $(THISDIR) | |
14 | !endif | |
15 | !endif | |
7be1f0d9 JS |
16 | |
17 | !include $(WXDIR)\src\makewat.env | |
18 | ||
19 | WXLIB = $(WXDIR)\lib | |
ddea7eb6 | 20 | LNK = $(OUTPUTDIR)\$(PROGRAM).lnk |
7be1f0d9 | 21 | |
ddea7eb6 | 22 | all: MAKEDIR $(OUTPUTDIR)\$(PROGRAM).exe $(EXTRATARGETS) .SYMBOLIC |
7be1f0d9 | 23 | |
ddea7eb6 CE |
24 | MAKEDIR: .SYMBOLIC |
25 | @if not exist $(OUTPUTDIR) mkdir $(OUTPUTDIR) | |
a0499e2f VZ |
26 | |
27 | !ifeq wxUSE_GUI 0 | |
28 | RESFILE= | |
29 | !else | |
ddea7eb6 | 30 | RESFILE=$(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 | |
55 | clean: .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 |