From d98fcc003d7e248a86cb62ad0fa2243604b2bd67 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 25 Oct 1999 07:19:13 +0000 Subject: [PATCH] Watcom makefile fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4171 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- distrib/msw/tmake/wat.t | 46 ++++++++++++++++++++++++++++++----------- src/msw/makefile.wat | 31 ++++++++++++++++----------- 2 files changed, 53 insertions(+), 24 deletions(-) diff --git a/distrib/msw/tmake/wat.t b/distrib/msw/tmake/wat.t index dd44990bfc..b500044781 100644 --- a/distrib/msw/tmake/wat.t +++ b/distrib/msw/tmake/wat.t @@ -10,7 +10,6 @@ #! Created: 14.07.99 #! Version: $Id$ #!############################################################################# - #${ #! include the code which parses filelist.txt file and initializes #! %wxCommon, %wxGeneric and %wxMSW hashes. @@ -34,8 +33,10 @@ #! doesn't compile, apparently next if $file =~ /^imagjpeg\./; + $isCFile = $file =~ /\.c$/; $file =~ s/cp?p?$/obj/; - $project{"WXCOMMONOBJS"} .= $file . " " + $project{"WXCOMMONOBJS"} .= $file . " "; + $project{"WXCOBJS"} .= $file . " " if $isCFile; } foreach $file (sort keys %wxMSW) { @@ -44,17 +45,20 @@ next if $wxGeneric{$file} =~ /\b16\b/; + my $isOleObj = $wxMSW{$file} =~ /\bO\b/; + my $isCFile = $file =~ /\.c$/; $file =~ s/cp?p?$/obj/; - $project{"WXMSWOBJS"} .= $file . " " + $project{"WXMSWOBJS"} .= $file . " "; + $project{"WXCOBJS"} .= $file . " " if $isCFile; + $project{"WXOLEOBJS"} .= $file . " " if $isOleObj } #$} +#! an attempt to embed '#' directly in the string somehow didn't work... +#$ $text = chr(35) . '!/binb/wmake.exe'; # This file was automatically generated by tmake at #$ Now() # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WAT.T! -#! an attempt to embed '#' directly in the string somehow didn't work... -#$ $text = chr(35) . '!/binb/wmake.exe'; - # # File: makefile.wat # Author: Julian Smart @@ -86,8 +90,8 @@ EXTRATARGETSCLEAN = clean_xpm clean_png clean_zlib GENDIR=$(WXDIR)\src\generic COMMDIR=$(WXDIR)\src\common XPMDIR=$(WXDIR)\src\xpm -OLEDIR=ole MSWDIR=$(WXDIR)\src\msw +OLEDIR=$(MSWDIR)\ole DOCDIR = $(WXDIR)\docs @@ -134,13 +138,22 @@ cleanall: clean foreach (@objs) { $text .= $_ . ': $('; s/\.obj$//; - if ( $wxMSW{$_} =~ /\bO\b/ ) { + if ( $project{"WXOLEOBJS"} =~ /\b\Q$_\E\b/ ) { $text .= 'OLEDIR)\\'; } else { $text .= 'MSWDIR)\\'; } - $text .= $_ . ".cpp\n" . - ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n"; + my $suffix, $cc; + if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) { + $suffix = "c"; + $cc="CC"; + } + else { + $suffix = "cpp"; + $cc="CCC"; + } + $text .= $_ . ".$suffix\n" . + " *\$($cc) \$(CPPFLAGS) \$(IFLAGS) \$<" . "\n\n"; } #$} @@ -154,8 +167,17 @@ cleanall: clean $text .= $_; s/\.obj$//; $text .= ': $(COMMDIR)\\'; - $text .= $_ . ".cpp\n" . - ' *$(CCC) $(CPPFLAGS) $(IFLAGS) $<' . "\n\n"; + my $suffix, $cc; + if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) { + $suffix = "c"; + $cc="CC"; + } + else { + $suffix = "cpp"; + $cc="CCC"; + } + $text .= $_ . ".$suffix\n" . + " *\$($cc) \$(CPPFLAGS) \$(IFLAGS) \$<" . "\n\n"; } #$} diff --git a/src/msw/makefile.wat b/src/msw/makefile.wat index 16744b0206..c04f50d4be 100644 --- a/src/msw/makefile.wat +++ b/src/msw/makefile.wat @@ -1,16 +1,23 @@ - - -# This file was automatically generated by tmake at 18:37, 1999/10/22 -# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WAT.T! - #!/binb/wmake.exe +# This file was automatically generated by tmake at 09:14, 1999/10/25 +# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WAT.T! + # # File: makefile.wat # Author: Julian Smart # Created: 1998 # # Makefile : Builds wxWindows library for Watcom C++, WIN32 +# +# NOTE: This file is generated from wat.t by tmake, but not all bugs have +# been removed from this process. If wxWindows doesn't compile, +# check the following and edit this makefile accordingly: +# +# - OLE-related files such as oleutils.cpp should have 'ole\' prepended +# to the path. +# - extended.c, gsocket.c, unzip.c must be compiled using $(CC), not $(CCC). +# They may also be wrongly specified as extended.cpp, etc. WXDIR = ..\.. @@ -27,8 +34,8 @@ EXTRATARGETSCLEAN = clean_xpm clean_png clean_zlib GENDIR=$(WXDIR)\src\generic COMMDIR=$(WXDIR)\src\common XPMDIR=$(WXDIR)\src\xpm -OLEDIR=ole MSWDIR=$(WXDIR)\src\msw +OLEDIR=$(MSWDIR)\ole DOCDIR = $(WXDIR)\docs @@ -290,7 +297,7 @@ accel.obj: $(MSWDIR)\accel.cpp app.obj: $(MSWDIR)\app.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< -automtn.obj: $(MSWDIR)\ole\automtn.cpp +automtn.obj: $(OLEDIR)\automtn.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< bitmap.obj: $(MSWDIR)\bitmap.cpp @@ -341,7 +348,7 @@ cursor.obj: $(MSWDIR)\cursor.cpp data.obj: $(MSWDIR)\data.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< -dataobj.obj: $(MSWDIR)\ole\dataobj.cpp +dataobj.obj: $(OLEDIR)\dataobj.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< dc.obj: $(MSWDIR)\dc.cpp @@ -377,10 +384,10 @@ dirdlg.obj: $(MSWDIR)\dirdlg.cpp dragimag.obj: $(MSWDIR)\dragimag.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< -dropsrc.obj: $(MSWDIR)\ole\dropsrc.cpp +dropsrc.obj: $(OLEDIR)\dropsrc.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< -droptgt.obj: $(MSWDIR)\ole\droptgt.cpp +droptgt.obj: $(OLEDIR)\droptgt.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< filedlg.obj: $(MSWDIR)\filedlg.cpp @@ -446,7 +453,7 @@ msgdlg.obj: $(MSWDIR)\msgdlg.cpp nativdlg.obj: $(MSWDIR)\nativdlg.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< -oleutils.obj: $(MSWDIR)\ole\oleutils.cpp +oleutils.obj: $(OLEDIR)\oleutils.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< ownerdrw.obj: $(MSWDIR)\ownerdrw.cpp @@ -545,7 +552,7 @@ utils.obj: $(MSWDIR)\utils.cpp utilsexc.obj: $(MSWDIR)\utilsexc.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< -uuid.obj: $(MSWDIR)\ole\uuid.cpp +uuid.obj: $(OLEDIR)\uuid.cpp *$(CCC) $(CPPFLAGS) $(IFLAGS) $< wave.obj: $(MSWDIR)\wave.cpp