X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8a2c6ef8d186df490df28a694820a5e8afc4b5e8..63a3cd7a8c737eb4571f27e5f2af37eda0f1c5cc:/src/makeprog.wat?ds=sidebyside diff --git a/src/makeprog.wat b/src/makeprog.wat index c36dce6abf..d2f8809d86 100644 --- a/src/makeprog.wat +++ b/src/makeprog.wat @@ -1,39 +1,66 @@ +# +# Changelist: 2003-02-25 - Juergen Ulbts - update from wxWindows 2.5.x/HEAD branch +# +# $+ .. $- means we get the result directly +THISDIR = $+ $(%cdrive):$(%cwd) $- + WXDIR = $(%WXWIN) +!ifndef EXEDIR +OUTPUTDIR = $(THISDIR)\Watcom +!else +OUTPUTDIR = $(THISDIR)\$(EXEDIR) +!ifeq EXEDIR "." +OUTPUTDIR = $(THISDIR) +!endif +!endif !include $(WXDIR)\src\makewat.env WXLIB = $(WXDIR)\lib -LNK = $(PROGRAM).lnk +LNK = $(OUTPUTDIR)\$(PROGRAM).lnk + +all: MAKEDIR $(OUTPUTDIR)\$(PROGRAM).exe $(EXTRATARGETS) .SYMBOLIC + +MAKEDIR: .SYMBOLIC + @if not exist $(OUTPUTDIR) mkdir $(OUTPUTDIR) -all: $(PROGRAM).exe +!ifeq wxUSE_GUI 0 +RESFILE= +!else +RESFILE=$(OUTPUTDIR)\$(PROGRAM).res +!endif -$(PROGRAM).exe : $(OBJECTS) $(PROGRAM).res $(LNK) $(WXLIB)\wx.lib +$(OUTPUTDIR)\$(PROGRAM).exe : $(OBJECTS) $(RESFILE) $(LNK) $(WXLIB)\$(LIBNAME).lib wlink @$(LNK) - $(BINDCOMMAND) $(PROGRAM).res +!ifneq wxUSE_GUI 0 + $(BINDCOMMAND) $(RESFILE) +!endif -$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc - $(RC) $(RESFLAGS1) $(PROGRAM).rc +!ifneq wxUSE_GUI 0 +$(RESFILE): $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc + $(RC) $(RESFLAGS) /fo=$(RESFILE) $(PROGRAM).rc +!endif -$(LNK) : makefile.wat +$(LNK) : .SYMBOLIC %create $(LNK) - @%append $(LNK) debug all - @%append $(LNK) system $(LINKOPTION) + @%append $(LNK) $(LDFLAGS) + @%append $(LNK) $(DEBUGINFO) + @%append $(LNK) system $(LINKSYSTEM) @%append $(LNK) $(STACK) - @%append $(LNK) name $(PROGRAM).exe - @%append $(LNK) file $(WXLIB)\wx.lib - @for %i in ($(EXTRALIBS)) do @%append $(LNK) file %i + @%append $(LNK) name $(OUTPUTDIR)\$(PROGRAM).exe @for %i in ($(OBJECTS)) do @%append $(LNK) file %i -# @%append $(LNK) $(MINDATA) -# @%append $(LNK) $(MAXDATA) + @for %i in ($(LIBS)) do @%append $(LNK) lib %i + @for %i in ($(EXTRALIBS)) do @%append $(LNK) lib %i clean: .SYMBOLIC - -erase *.obj - -erase *.bak - -erase *.err - -erase *.pch - -erase *.lib - -erase *.lnk - -erase *.res - -erase *.exe - -erase *.lbc + -erase $(OUTPUTDIR)\*.obj + -erase $(OUTPUTDIR)\*.bak + -erase $(OUTPUTDIR)\*.err + -erase $(OUTPUTDIR)\*.pch + -erase $(OUTPUTDIR)\*.lib + -erase $(LNK) + -erase $(OUTPUTDIR)\*.res + -erase $(OUTPUTDIR)\*.exe + -erase $(OUTPUTDIR)\*.lbc + -rmdir $(OUTPUTDIR)