From 06b80cf53ca4a9c1fb6ddfd78e7f8386062759f2 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Sat, 15 Dec 2012 09:40:30 -0800 Subject: [PATCH] Fixed makefile to not always include network components when compiling with MinGW and added ability to pass arbitrary arguments when invoking gcc with the batch files --- build_mingw.bat | 2 +- build_mingw_ether.bat | 2 +- build_mingw_noasync.bat | 2 +- makefile | 13 ++++++------- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/build_mingw.bat b/build_mingw.bat index ff738d41..a87e8c0d 100644 --- a/build_mingw.bat +++ b/build_mingw.bat @@ -17,4 +17,4 @@ if ERRORLEVEL 1 path C:\MinGW\bin;%path% if not exist BIN mkdir BIN gcc -v 1>NUL 2>NUL if ERRORLEVEL 1 echo "MinGW Environment Unavailable" -mingw32-make WIN32=1 -f makefile %1 %2 %3 %4 +mingw32-make WIN32=1 -f makefile %* diff --git a/build_mingw_ether.bat b/build_mingw_ether.bat index 51ec0bfd..e50f29fd 100644 --- a/build_mingw_ether.bat +++ b/build_mingw_ether.bat @@ -13,4 +13,4 @@ if ERRORLEVEL 1 path C:\MinGW\bin;%path% if not exist BIN mkdir BIN gcc -v 1>NUL 2>NUL if ERRORLEVEL 1 echo "MinGW Environment Unavailable" -mingw32-make WIN32=1 USE_NETWORK=1 -f makefile %1 %2 %3 %4 +mingw32-make WIN32=1 USE_NETWORK=1 -f makefile %* diff --git a/build_mingw_noasync.bat b/build_mingw_noasync.bat index 04f4a19f..a53eab53 100644 --- a/build_mingw_noasync.bat +++ b/build_mingw_noasync.bat @@ -12,4 +12,4 @@ if ERRORLEVEL 1 path C:\MinGW\bin;%path% if not exist BIN mkdir BIN gcc -v 1>NUL 2>NUL if ERRORLEVEL 1 echo "MinGW Environment Unavailable" -mingw32-make WIN32=1 NOASYNCH=1 -f makefile %1 %2 %3 %4 +mingw32-make WIN32=1 NOASYNCH=1 -f makefile %* diff --git a/makefile b/makefile index 3f8a5703..74edb538 100644 --- a/makefile +++ b/makefile @@ -239,7 +239,7 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin) # Given we have libpcap components, consider other network connections as well ifneq (,$(call find_lib,vdeplug)) # libvdeplug requires the use of the OS provided libpcap - ifeq (,$(findstring usr/local,$(NETWORK_CCDEFS))) + ifeq (,$(findstring usr/local,$(NETWORK_CCDEFS))) ifneq (,$(call find_include,libvdeplug)) # Provide support for vde networking NETWORK_CCDEFS += -DUSE_VDE_NETWORK @@ -293,19 +293,17 @@ else endif endif ifeq (pcap,$(shell if exist ..\windows-build\winpcap\Wpdpack\include\pcap.h echo pcap)) - PCAP_CCDEFS = -I../windows-build/winpcap/Wpdpack/include -I$(GCC_Path)..\include\ddk -DUSE_SHARED NETWORK_LDFLAGS = - NETWORK_OPT = -DUSE_SHARED + NETWORK_OPT = -DUSE_SHARED -I../windows-build/winpcap/Wpdpack/include -I$(GCC_Path)..\include\ddk NETWORK_FEATURES = - dynamic networking support using windows-build provided libpcap components else ifeq (pcap,$(shell if exist $(dir $(GCC_Path))..\include\pcap.h echo pcap)) - PCAP_CCDEFS = -DUSE_SHARED -I$(GCC_Path)..\include\ddk NETWORK_LDFLAGS = - NETWORK_OPT = -DUSE_SHARED + NETWORK_OPT = -DUSE_SHARED -I$(GCC_Path)..\include\ddk NETWORK_FEATURES = - dynamic networking support using libpcap components found in the MinGW directories endif endif - OS_CCDEFS = -fms-extensions $(PTHREADS_CCDEFS) $(PCAP_CCDEFS) + OS_CCDEFS = -fms-extensions $(PTHREADS_CCDEFS) OS_LDFLAGS = -lm -lwsock32 -lwinmm $(PTHREADS_LDFLAGS) EXE = .exe ifneq (binexists,$(shell if exist BIN echo binexists)) @@ -454,7 +452,8 @@ PDP11 = ${PDP11D}/pdp11_fp.c ${PDP11D}/pdp11_cpu.c ${PDP11D}/pdp11_dz.c \ ${PDP11D}/pdp11_rh.c ${PDP11D}/pdp11_tu.c ${PDP11D}/pdp11_cpumod.c \ ${PDP11D}/pdp11_cr.c ${PDP11D}/pdp11_rf.c ${PDP11D}/pdp11_dl.c \ ${PDP11D}/pdp11_ta.c ${PDP11D}/pdp11_rc.c ${PDP11D}/pdp11_kg.c \ - ${PDP11D}/pdp11_ke.c ${PDP11D}/pdp11_dc.c ${PDP11D}/pdp11_io_lib.c + ${PDP11D}/pdp11_ke.c ${PDP11D}/pdp11_dc.c ${PDP11D}/pdp11_dmc.c \ + ${PDP11D}/pdp11_io_lib.c PDP11_OPT = -DVM_PDP11 -I ${PDP11D} ${NETWORK_OPT}