makefile: Cleaned up MinGw build and provided an option to build without Asynch I/O support using MinGw.
This commit is contained in:
parent
599c471eb4
commit
d8e4a43f9a
2 changed files with 27 additions and 8 deletions
15
build_mingw_noasync.bat
Normal file
15
build_mingw_noasync.bat
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
@echo off
|
||||||
|
rem Build without SIM_ASYNCH_IO defined (avoiding the use of pthreads)
|
||||||
|
rem Compile all of SIMH using MINGW make and gcc environment
|
||||||
|
rem Individual simulator sources are in .\simulator_name
|
||||||
|
rem Individual simulator executables are to .\bin
|
||||||
|
rem
|
||||||
|
rem If needed, define the path for the MINGW bin directory.
|
||||||
|
rem (this should already be set if MINGW was installed correctly)
|
||||||
|
rem
|
||||||
|
gcc -v 1>NUL 2>NUL
|
||||||
|
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
|
10
makefile
10
makefile
|
@ -74,22 +74,26 @@ ifeq ($(WIN32),)
|
||||||
else
|
else
|
||||||
#Win32 Environments (via MinGW32)
|
#Win32 Environments (via MinGW32)
|
||||||
GCC_Path := $(dir $(shell where gcc.exe))
|
GCC_Path := $(dir $(shell where gcc.exe))
|
||||||
|
ifeq ($(NOASYNCH),)
|
||||||
ifeq (pthreads,$(shell if exist ..\pthreads\Pre-built.2\include\pthread.h echo pthreads))
|
ifeq (pthreads,$(shell if exist ..\pthreads\Pre-built.2\include\pthread.h echo pthreads))
|
||||||
PTHREADS_CCDEFS = -DSIM_ASYNCH_IO -DUSE_READER_THREAD -I../pthreads/Pre-built.2/include
|
PTHREADS_CCDEFS = -DSIM_ASYNCH_IO -DUSE_READER_THREAD -I../pthreads/Pre-built.2/include
|
||||||
PTHREADS_LDFLAGS = -lpthreadVC2 -L..\pthreads\Pre-built.2\lib
|
PTHREADS_LDFLAGS = -lpthreadVC2 -L..\pthreads\Pre-built.2\lib
|
||||||
NETWORK_OPT = -DUSE_SHARED
|
else
|
||||||
ifeq (pthreads,$(shell if exist $(dir $(GCC_Path))..\include\pthread.h echo pthreads))
|
ifeq (pthreads,$(shell if exist $(dir $(GCC_Path))..\include\pthread.h echo pthreads))
|
||||||
PTHREADS_CCDEFS = -DSIM_ASYNCH_IO -DUSE_READER_THREAD
|
PTHREADS_CCDEFS = -DSIM_ASYNCH_IO -DUSE_READER_THREAD
|
||||||
PTHREADS_LDFLAGS = -lpthreads
|
PTHREADS_LDFLAGS = -lpthread
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
ifeq (pcap,$(shell if exist ..\winpcap\Wpdpack\include\pcap.h echo pcap))
|
ifeq (pcap,$(shell if exist ..\winpcap\Wpdpack\include\pcap.h echo pcap))
|
||||||
PCAP_CCDEFS = -I../winpcap/Wpdpack/include -DUSE_SHARED
|
PCAP_CCDEFS = -I../winpcap/Wpdpack/include -DUSE_SHARED
|
||||||
NETWORK_LDFLAGS =
|
NETWORK_LDFLAGS =
|
||||||
|
NETWORK_OPT = -DUSE_SHARED
|
||||||
else
|
else
|
||||||
ifeq (pcap,$(shell if exist $(dir $(GCC_Path))..\include\pcap.h echo pcap))
|
ifeq (pcap,$(shell if exist $(dir $(GCC_Path))..\include\pcap.h echo pcap))
|
||||||
PCAP_CCDEFS = -DUSE_SHARED
|
PCAP_CCDEFS = -DUSE_SHARED
|
||||||
NETWORK_LDFLAGS =
|
NETWORK_LDFLAGS =
|
||||||
|
NETWORK_OPT = -DUSE_SHARED
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
OS_CCDEFS = -fms-extensions -O2 $(PTHREADS_CCDEFS) $(PCAP_CCDEFS)
|
OS_CCDEFS = -fms-extensions -O2 $(PTHREADS_CCDEFS) $(PCAP_CCDEFS)
|
||||||
|
@ -340,7 +344,7 @@ SWTP_OPT = -I ${SWTPD}
|
||||||
#
|
#
|
||||||
ALL = pdp1 pdp4 pdp7 pdp8 pdp9 pdp15 pdp11 pdp10 \
|
ALL = pdp1 pdp4 pdp7 pdp8 pdp9 pdp15 pdp11 pdp10 \
|
||||||
vax vax780 nova eclipse hp2100 i1401 i1620 s3 \
|
vax vax780 nova eclipse hp2100 i1401 i1620 s3 \
|
||||||
altair altairz80 gri i1620 i7094 ibm1130 id16 \
|
altair altairz80 gri i7094 ibm1130 id16 \
|
||||||
id32 sds lgp h316 swtp
|
id32 sds lgp h316 swtp
|
||||||
|
|
||||||
all : ${ALL}
|
all : ${ALL}
|
||||||
|
|
Loading…
Add table
Reference in a new issue