From 83120988c0c1926cf618c92447821f392e89e05b Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Fri, 21 Apr 2017 13:24:42 +0300 Subject: [PATCH] Collapse multiple NT_*_MAKEFILE scripts into a single NT_MAKEFILE Now NT_MAKEFILE should support building of static and dynamic, single- and multi-threaded, 32- and 64-bit GC libraries. The default is dynamic multi-threaded GC library. * NT_MAKEFILE: Remove comment about assuming a single thread. * NT_MAKEFILE (MY_CPU): Replace with CVTRES_CPU; add comment; add sample for X64. * NT_MAKEFILE (CPU): Comment out (defined automatically). * NT_MAKEFILE (CFLAGS_SPECIFIC, GC_DLL, GC_LIB, LINK_GC): New variable; add samples for X64, static, single-threaded library. * NT_MAKEFILE (LINK_DLL_FLAGS): New variable (copied from LINK64_FLAGS of NT_X64_THREADS_MAKEFILE file); remove unneeded system .lib files. * NT_MAKEFILE (AO_SRC_DIR, AO_INCLUDE_DIR): New variable (copied from NT_STATIC_THREADS_MAKEFILE file). * NT_MAKEFILE (OBJS): Add win32_threads.obj, thread_local_alloc.obj. * NT_MAKEFILE (.c.obj, .cpp.obj): Add -I$(AO_INCLUDE_DIR) option; replace $(cvars) with $(CFLAGS_SPECIFIC); add /wd4100 /wd4127 /wd4701 options (copied from NT_X64_THREADS_MAKEFILE). * NT_MAKEFILE (.c.obj): Add -DCORD_NOT_DLL option (copied from NT_X64_THREADS_MAKEFILE); Add comment about _CRT_SECURE_NO_DEPRECATE (copied from NT_X64_STATIC_THREADS_MAKEFILE file). * NT_MAKEFILE (gc_cpp.cpp): Remove target. * NT_MAKEFILE (gc.lib, gctest.exe, cord\de.exe, test_cpp.exe): Replace gc.lib with $(GC_LIB). * NT_MAKEFILE (gc.lib): Replace "lib /MACHINE:i386 /out:gc.lib" with "$(LINK_GC) /MACHINE:$(CPU)"; remove comment about original NT SDK. * NT_MAKEFILE (gctest.exe): Remove comments related to win32s. * NT_MAKEFILE (gctest.exe, cord\de.exe, test_cpp.exe): Replace "-debug -debugtype:cv" options with $(ldebug). * NT_MAKEFILE ($(AO_SRC_DIR), clean): New target (copied from NT_X64_THREADS_MAKEFILE file). * NT_STATIC_THREADS_MAKEFILE: Remove. * NT_X64_STATIC_THREADS_MAKEFILE: Likewise. * NT_X64_THREADS_MAKEFILE: Likewise. --- NT_MAKEFILE | 93 ++++++++++++++++++++++++---------- NT_STATIC_THREADS_MAKEFILE | 71 -------------------------- NT_X64_STATIC_THREADS_MAKEFILE | 70 ------------------------- NT_X64_THREADS_MAKEFILE | 87 ------------------------------- 4 files changed, 67 insertions(+), 254 deletions(-) delete mode 100644 NT_STATIC_THREADS_MAKEFILE delete mode 100644 NT_X64_STATIC_THREADS_MAKEFILE delete mode 100644 NT_X64_THREADS_MAKEFILE diff --git a/NT_MAKEFILE b/NT_MAKEFILE index 5c3e7b09..d5d54438 100644 --- a/NT_MAKEFILE +++ b/NT_MAKEFILE @@ -1,61 +1,102 @@ -# Makefile for Windows NT. Assumes Microsoft compiler, and a single thread. -# Use "nmake nodebug=1 all" for optimized versions of library, gctest and editor. +# Makefile for Windows NT. Assumes Microsoft compiler. +# Use "nmake -f NT_MAKEFILE nodebug=1 all" for optimized versions of library, +# gctest and editor. + +# For building x86 (32-bit) library: +CVTRES_CPU=X86 +# +# For building x64 (amd64) library: +#CVTRES_CPU=X64 + +#CPU=$(CVTRES_CPU) -MY_CPU=X86 -CPU=$(MY_CPU) !include +# For static single-threaded collector library: +#CFLAGS_SPECIFIC=$(cvars) -DGC_NOT_DLL +#GC_DLL= +#GC_LIB=gc.lib +# +# For static multi-threaded collector library: +#CFLAGS_SPECIFIC=$(cvarsmt) -DGC_NOT_DLL -DGC_THREADS -DTHREAD_LOCAL_ALLOC -DPARALLEL_MARK +#GC_DLL= +#GC_LIB=gc.lib +# +# For dynamic multi-threaded collector library: +CFLAGS_SPECIFIC=$(cvarsmt) -DGC_DLL -DGC_THREADS -DTHREAD_LOCAL_ALLOC -DPARALLEL_MARK +GC_DLL=gc.dll +GC_LIB=gc_dll.lib +#GC_DLL=gc64.dll +#GC_LIB=gc64_dll.lib + +LINK_DLL_FLAGS=kernel32.lib user32.lib uuid.lib \ + /nologo /subsystem:windows /dll /incremental:no /pdb:"gc.pdb" \ + /out:$(GC_DLL) /implib:$(GC_LIB) + +# For static collector library: +#LINK_GC=lib /out:$(GC_LIB) +# +# For dynamic multi-threaded collector library: +LINK_GC=link $(ldebug) $(LINK_DLL_FLAGS) + # Make sure that .cc is not viewed as a suffix. It is for VC++2005, but # not earlier versions. We can deal with either, but not inconsistency. .SUFFIXES: .SUFFIXES: .obj .cpp .c -OBJS= alloc.obj reclaim.obj allchblk.obj misc.obj mach_dep.obj os_dep.obj mark_rts.obj headers.obj mark.obj obj_map.obj blacklst.obj finalize.obj new_hblk.obj dbg_mlc.obj fnlz_mlc.obj malloc.obj stubborn.obj dyn_load.obj typd_mlc.obj ptr_chck.obj gc_cpp.obj mallocx.obj extra\msvc_dbg.obj +# Atomic_ops installation directory. For win32, the source directory +# should do, since we only need the headers. +# We assume this was manually unpacked. +AO_SRC_DIR=libatomic_ops/src +AO_INCLUDE_DIR=$(AO_SRC_DIR) + +OBJS= alloc.obj reclaim.obj allchblk.obj misc.obj mach_dep.obj os_dep.obj mark_rts.obj headers.obj mark.obj obj_map.obj blacklst.obj finalize.obj new_hblk.obj dbg_mlc.obj fnlz_mlc.obj malloc.obj stubborn.obj dyn_load.obj typd_mlc.obj ptr_chck.obj gc_cpp.obj mallocx.obj win32_threads.obj extra\msvc_dbg.obj thread_local_alloc.obj all: gctest.exe cord\de.exe test_cpp.exe .c.obj: - $(cc) $(cdebug) $(cflags) $(cvars) -Iinclude -DALL_INTERIOR_POINTERS -DGC_NOT_DLL -D_CRT_SECURE_NO_DEPRECATE $*.c /Fo$*.obj + $(cc) $(cdebug) $(cflags) $(CFLAGS_SPECIFIC) -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -DCORD_NOT_DLL -D_CRT_SECURE_NO_DEPRECATE $*.c /Fo$*.obj /wd4100 /wd4127 /wd4701 +# Disable crt security warnings, since unfortunately they warn about all sorts +# of safe uses of strncpy. It would be nice to leave the rest enabled. .cpp.obj: - $(cc) $(cdebug) $(cflags) $(cvars) -Iinclude -DALL_INTERIOR_POINTERS -DGC_NOT_DLL -D_CRT_SECURE_NO_DEPRECATE $*.cpp /Fo$*.obj + $(cc) $(cdebug) $(cflags) $(CFLAGS_SPECIFIC) -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -D_CRT_SECURE_NO_DEPRECATE $*.cpp /Fo$*.obj $(OBJS) tests\test.obj: include\private\gc_priv.h include\private\gc_hdrs.h include\gc.h include\private\gcconfig.h include\private\gc_locks.h include\private\gc_pmark.h include\gc_mark.h include\gc_disclaim.h include\private\msvc_dbg.h -gc.lib: $(OBJS) - lib /MACHINE:i386 /out:gc.lib $(OBJS) -# The original NT SDK used lib32 instead of lib +$(GC_LIB): $(OBJS) + $(LINK_GC) /MACHINE:$(CPU) $(OBJS) -gctest.exe: tests\test.obj gc.lib -# The following works for win32 debugging. For win32s debugging use debugtype:coff -# and add mapsympe line. -# This produces a "GUI" application that opens no windows and writes to the log file -# "gctest.gc.log". This is done to make the result runnable under win32s. - $(link) -debug -debugtype:cv $(guiflags) -stack:131072 -out:$*.exe tests\test.obj $(guilibs) gc.lib +gctest.exe: tests\test.obj $(GC_LIB) + $(link) $(ldebug) $(guiflags) -stack:131072 -out:$*.exe tests\test.obj $(guilibs) $(GC_LIB) # mapsympe -n -o gctest.sym gctest.exe +# This produces a GUI app that opens no window and writes to gctest.gc.log. cord\de_win.rbj: cord\de_win.res - cvtres /MACHINE:$(MY_CPU) /OUT:cord\de_win.rbj cord\de_win.res + cvtres /MACHINE:$(CVTRES_CPU) /OUT:cord\de_win.rbj cord\de_win.res cord\tests\de.obj cord\tests\de_win.obj: include\cord.h include\cord_pos.h cord\tests\de_win.h cord\tests\de_cmds.h cord\de_win.res: cord\tests\de_win.rc cord\tests\de_win.h cord\tests\de_cmds.h $(rc) $(rcvars) -r -fo cord\de_win.res cord\tests\de_win.rc -# Cord/de is a real win32 gui application. -cord\de.exe: cord\cordbscs.obj cord\cordxtra.obj cord\tests\de.obj cord\tests\de_win.obj cord\de_win.rbj gc.lib - $(link) -debug -debugtype:cv $(guiflags) -stack:16384 -out:cord\de.exe cord\cordbscs.obj cord\cordxtra.obj cord\tests\de.obj cord\tests\de_win.obj cord\de_win.rbj gc.lib $(guilibs) +# Cord/de is a real win32 GUI app. +cord\de.exe: cord\cordbscs.obj cord\cordxtra.obj cord\tests\de.obj cord\tests\de_win.obj cord\de_win.rbj $(GC_LIB) + $(link) $(ldebug) $(guiflags) -stack:16384 -out:cord\de.exe cord\cordbscs.obj cord\cordxtra.obj cord\tests\de.obj cord\tests\de_win.obj cord\de_win.rbj $(GC_LIB) $(guilibs) gc_cpp.obj: include\gc_cpp.h include\gc.h -gc_cpp.cpp: gc_cpp.cc -# copy gc_cpp.cc gc_cpp.cpp - test_cpp.cpp: tests\test_cpp.cc copy tests\test_cpp.cc test_cpp.cpp # This generates the C++ test executable. The executable expects # a single numeric argument, which is the number of iterations. -# The output appears in the file "test_cpp.gc.log". -test_cpp.exe: test_cpp.obj include\gc_cpp.h include\gc.h gc.lib - $(link) -debug -debugtype:cv $(guiflags) -stack:16384 -out:test_cpp.exe test_cpp.obj gc.lib $(guilibs) +# The output appears in test_cpp.gc.log file. +test_cpp.exe: test_cpp.obj include\gc_cpp.h include\gc.h $(GC_LIB) + $(link) $(ldebug) $(guiflags) -stack:16384 -out:test_cpp.exe test_cpp.obj $(GC_LIB) $(guilibs) + +$(AO_SRC_DIR): + tar xvfz $(AO_SRC_DIR).tar.gz + +clean: + del *.exe *.log *.obj *.pdb cord\*.exe cord\*.exp cord\*.lib cord\*.obj cord\*.pdb cord\*.rbj cord\*.res cord\tests\*.obj extra\*.obj gc*.lib gc*.dll gc*.exp test_cpp.cpp tests\*.obj 2> nul diff --git a/NT_STATIC_THREADS_MAKEFILE b/NT_STATIC_THREADS_MAKEFILE deleted file mode 100644 index 6919bad8..00000000 --- a/NT_STATIC_THREADS_MAKEFILE +++ /dev/null @@ -1,71 +0,0 @@ -# Makefile for Windows NT. Assumes Microsoft compiler. -# Use "nmake nodebug=1 all" for optimized versions of library, gctest and editor. - -MY_CPU=X86 -CPU=$(MY_CPU) -!include - -# Make sure that .cc is not viewed as a suffix. It is for VC++2005, but -# not earlier versions. We can deal with either, but not inconsistency. -.SUFFIXES: -.SUFFIXES: .obj .cpp .c - -# Atomic_ops installation directory. For win32, the source directory -# should do, since we only need the headers. -# We assume this was manually unpacked, since I'm not sure there is -# a Windows standard command line tool to do this. -AO_SRC_DIR=libatomic_ops/src -AO_INCLUDE_DIR=$(AO_SRC_DIR) - -OBJS= alloc.obj reclaim.obj allchblk.obj misc.obj mach_dep.obj os_dep.obj mark_rts.obj headers.obj mark.obj obj_map.obj blacklst.obj finalize.obj new_hblk.obj dbg_mlc.obj fnlz_mlc.obj malloc.obj stubborn.obj dyn_load.obj typd_mlc.obj ptr_chck.obj gc_cpp.obj mallocx.obj win32_threads.obj extra\msvc_dbg.obj thread_local_alloc.obj - -all: gctest.exe cord\de.exe test_cpp.exe - -.c.obj: - $(cc) $(cdebug) $(cflags) $(cvarsmt) -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -DGC_NOT_DLL -DGC_THREADS -DTHREAD_LOCAL_ALLOC -DPARALLEL_MARK -D_CRT_SECURE_NO_DEPRECATE $*.c /Fo$*.obj - -.cpp.obj: - $(cc) $(cdebug) $(cflags) $(cvarsmt) -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -DGC_NOT_DLL -DGC_THREADS -DTHREAD_LOCAL_ALLOC -D_CRT_SECURE_NO_DEPRECATE $*.cpp /Fo$*.obj - -$(OBJS) tests\test.obj: include\private\gc_priv.h include\private\gc_hdrs.h include\gc.h include\private\gcconfig.h include\private\gc_locks.h include\private\gc_pmark.h include\gc_mark.h include\gc_disclaim.h include\private\msvc_dbg.h - -gc.lib: $(OBJS) - lib /MACHINE:i386 /out:gc.lib $(OBJS) -# The original NT SDK used lib32 instead of lib - -gctest.exe: tests\test.obj gc.lib -# The following works for win32 debugging. For win32s debugging use debugtype:coff -# and add mapsympe line. -# This produces a "GUI" application that opens no windows and writes to the log file -# "gctest.gc.log". This is done to make the result runnable under win32s. - $(link) -debug -debugtype:cv $(guiflags) -stack:262144 -out:$*.exe tests\test.obj $(guilibs) gc.lib -# mapsympe -n -o gctest.sym gctest.exe - -cord\de_win.rbj: cord\de_win.res - cvtres /MACHINE:$(MY_CPU) /OUT:cord\de_win.rbj cord\de_win.res - -cord\tests\de.obj cord\tests\de_win.obj: include\cord.h include\cord_pos.h cord\tests\de_win.h cord\tests\de_cmds.h - -cord\de_win.res: cord\tests\de_win.rc cord\tests\de_win.h cord\tests\de_cmds.h - $(rc) $(rcvars) -r -fo cord\de_win.res cord\tests\de_win.rc - -# Cord/de is a real win32 gui application. -cord\de.exe: cord\cordbscs.obj cord\cordxtra.obj cord\tests\de.obj cord\tests\de_win.obj cord\de_win.rbj gc.lib - $(link) -debug -debugtype:cv $(guiflags) -stack:16384 -out:cord\de.exe cord\cordbscs.obj cord\cordxtra.obj cord\tests\de.obj cord\tests\de_win.obj cord\de_win.rbj gc.lib $(guilibs) - -gc_cpp.obj: include\gc_cpp.h include\gc.h - -gc_cpp.cpp: gc_cpp.cc -# copy gc_cpp.cc gc_cpp.cpp - -test_cpp.cpp: tests\test_cpp.cc - copy tests\test_cpp.cc test_cpp.cpp - -# This generates the C++ test executable. The executable expects -# a single numeric argument, which is the number of iterations. -# The output appears in the file "test_cpp.gc.log". -test_cpp.exe: test_cpp.obj include\gc_cpp.h include\gc.h gc.lib - $(link) -debug -debugtype:cv $(guiflags) -stack:16384 -out:test_cpp.exe test_cpp.obj gc.lib $(guilibs) - -$(AO_SRC_DIR): - tar xvfz $(AO_SRC_DIR).tar.gz; diff --git a/NT_X64_STATIC_THREADS_MAKEFILE b/NT_X64_STATIC_THREADS_MAKEFILE deleted file mode 100644 index b60d09f1..00000000 --- a/NT_X64_STATIC_THREADS_MAKEFILE +++ /dev/null @@ -1,70 +0,0 @@ -# Makefile for Windows NT. Assumes Microsoft compiler. -# Use "nmake nodebug=1 all" for optimized versions of library, gctest and editor. - -MY_CPU=AMD64 -CPU=$(MY_CPU) -!include - -# Make sure that .cc is not viewed as a suffix. It is for VC++2005, but -# not earlier versions. We can deal with either, but not inconsistency. -.SUFFIXES: -.SUFFIXES: .obj .cpp .c - -# Atomic_ops installation directory. For win32, the source directory -# should do, since we only need the headers. -# We assume this was manually unpacked, since I'm not sure there is -# a Windows standard command line tool to do this. -AO_SRC_DIR=libatomic_ops/src -AO_INCLUDE_DIR=$(AO_SRC_DIR) - -OBJS= alloc.obj reclaim.obj allchblk.obj misc.obj mach_dep.obj os_dep.obj mark_rts.obj headers.obj mark.obj obj_map.obj blacklst.obj finalize.obj new_hblk.obj dbg_mlc.obj fnlz_mlc.obj malloc.obj stubborn.obj dyn_load.obj typd_mlc.obj ptr_chck.obj gc_cpp.obj mallocx.obj win32_threads.obj extra\msvc_dbg.obj thread_local_alloc.obj - -all: gctest.exe cord\de.exe test_cpp.exe - -.c.obj: - $(cc) $(cdebug) $(cflags) $(cvarsmt) -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -DGC_NOT_DLL -DGC_THREADS -DTHREAD_LOCAL_ALLOC -D_CRT_SECURE_NO_DEPRECATE $*.c /Fo$*.obj /wd4100 /wd4127 /wd4701 -# Disable "may not be initialized" warnings. They're too approximate. -# Disable crt security warnings, since unfortunately they warn about all sorts -# of safe uses of strncpy. It would be nice to leave the rest enabled. - -.cpp.obj: - $(cc) $(cdebug) $(cflags) $(cvarsmt) -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -DGC_NOT_DLL -DGC_THREADS -DTHREAD_LOCAL_ALLOC -D_CRT_SECURE_NO_DEPRECATE $*.cpp /Fo$*.obj - -$(OBJS) tests\test.obj: include\private\gc_priv.h include\private\gc_hdrs.h include\gc.h include\private\gcconfig.h include\private\gc_locks.h include\private\gc_pmark.h include\gc_mark.h include\gc_disclaim.h include\private\msvc_dbg.h - -gc.lib: $(OBJS) - lib /MACHINE:X64 /out:gc.lib $(OBJS) - -gctest.exe: tests\test.obj gc.lib -# This produces a "GUI" application that opens no windows and writes to -# the log file "gctest.gc.log". - $(link) $(ldebug) $(guiflags) -out:$*.exe tests\test.obj $(guilibs) gc.lib - -cord\de_win.rbj: cord\de_win.res - cvtres /MACHINE:$(MY_CPU) /OUT:cord\de_win.rbj cord\de_win.res - -cord\tests\de.obj cord\tests\de_win.obj: include\cord.h include\cord_pos.h cord\tests\de_win.h cord\tests\de_cmds.h - -cord\de_win.res: cord\tests\de_win.rc cord\tests\de_win.h cord\tests\de_cmds.h - $(rc) $(rcvars) -r -fo cord\de_win.res cord\tests\de_win.rc - -# Cord/de is a real win32 gui application. -cord\de.exe: cord\cordbscs.obj cord\cordxtra.obj cord\tests\de.obj cord\tests\de_win.obj cord\de_win.rbj gc.lib - $(link) $(ldebug) $(guiflags) -stack:16384 -out:cord\de.exe cord\cordbscs.obj cord\cordxtra.obj cord\tests\de.obj cord\tests\de_win.obj cord\de_win.rbj gc.lib $(guilibs) - -gc_cpp.obj: include\gc_cpp.h include\gc.h - -gc_cpp.cpp: gc_cpp.cc -# copy gc_cpp.cc gc_cpp.cpp - -test_cpp.cpp: tests\test_cpp.cc - copy tests\test_cpp.cc test_cpp.cpp - -# This generates the C++ test executable. The executable expects -# a single numeric argument, which is the number of iterations. -# The output appears in the file "test_cpp.gc.log". -test_cpp.exe: test_cpp.obj include\gc_cpp.h include\gc.h gc.lib - $(link) $(ldebug) $(guiflags) -stack:16384 -out:test_cpp.exe test_cpp.obj gc.lib $(guilibs) - -$(AO_SRC_DIR): - tar xvfz $(AO_SRC_DIR).tar.gz; diff --git a/NT_X64_THREADS_MAKEFILE b/NT_X64_THREADS_MAKEFILE deleted file mode 100644 index d90008ce..00000000 --- a/NT_X64_THREADS_MAKEFILE +++ /dev/null @@ -1,87 +0,0 @@ -# Makefile for Windows NT. Assumes Microsoft compiler. -# modified 2007 August by Friedrich Dominicus: -# - copied from NT_X64_STATIC_THREADS_MAKEFILES -# - checked agaist gc.mak (NT_THREADS_MAKEFILE) -# - added changes to integrate the tools -# - currently just with debug information -# problems can be sent to -# frido at q-software-solutions.de -# -# or the mailing list - - -MY_CPU=AMD64 -CPU=$(MY_CPU) -!include - -# Make sure that .cc is not viewed as a suffix. It is for VC++2005, but # not earlier versions. We can deal with either, but not inconsistency. -.SUFFIXES: -.SUFFIXES: .obj .cpp .c - -# Atomic_ops installation directory. For win32, the source directory -# should do, since we only need the headers. -# We assume this was manually unpacked, since I'm not sure there is -# a Windows standard command line tool to do this. -AO_SRC_DIR=libatomic_ops/src -AO_INCLUDE_DIR=$(AO_SRC_DIR) - -OBJS= alloc.obj reclaim.obj allchblk.obj misc.obj mach_dep.obj os_dep.obj mark_rts.obj headers.obj mark.obj obj_map.obj blacklst.obj finalize.obj new_hblk.obj dbg_mlc.obj fnlz_mlc.obj malloc.obj stubborn.obj dyn_load.obj typd_mlc.obj ptr_chck.obj gc_cpp.obj mallocx.obj win32_threads.obj extra\msvc_dbg.obj thread_local_alloc.obj - -all: gc64.dll gctest.exe cord\de.exe test_cpp.exe - -.c.obj: - $(cc) $(cdebug) $(cflags) $(cvarsmt) -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -DGC_DLL -DGC_THREADS -DCORD_NOT_DLL -D_CRT_SECURE_NO_DEPRECATE $*.c /Fo$*.obj /wd4100 /wd4127 /wd4701 -# Disable "may not be initialized" warnings. They're too approximate. -# Disable crt security warnings, since unfortunately they warn about all sorts # of safe uses of strncpy. It would be nice to leave the rest enabled. - -.cpp.obj: - $(cc) $(cdebug) $(cflags) $(cvarsmt) -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -DGC_DLL -DGC_THREADS -D_CRT_SECURE_NO_DEPRECATE $*.cpp /Fo$*.obj - -$(OBJS) tests\test.obj: include\private\gc_priv.h include\private\gc_hdrs.h include\gc.h include\private\gcconfig.h include\private\gc_locks.h include\private\gc_pmark.h include\gc_mark.h include\gc_disclaim.h include\private\msvc_dbg.h - - -LINK64=link.exe -LINK64_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib \ -shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo \ -/subsystem:windows /dll /incremental:no /pdb:"gc.pdb" /machine:X64 /out:"gc64.dll" \ -/implib:"gc64_dll.lib" - -gc64.dll : $(OBJS) - $(LINK64) $(ldebug) $(LINK64_FLAGS) $(OBJS) - - -gctest.exe: tests\test.obj gc64_dll.lib -# This produces a "GUI" application that opens no windows and writes to -# the log file "gctest.gc.log". - $(link) $(ldebug) $(guiflags) -out:$*.exe tests\test.obj $(guilibs) gc64_dll.lib - -cord\de_win.rbj: cord\de_win.res - cvtres /MACHINE:$(MY_CPU) /OUT:cord\de_win.rbj cord\de_win.res - -cord\tests\de.obj cord\tests\de_win.obj: include\cord.h include\cord_pos.h cord\tests\de_win.h cord\tests\de_cmds.h - -cord\de_win.res: cord\tests\de_win.rc cord\tests\de_win.h cord\tests\de_cmds.h - $(rc) $(rcvars) -r -fo cord\de_win.res cord\tests\de_win.rc - -# Cord/de is a real win32 gui application. -cord\de.exe: cord\cordbscs.obj cord\cordxtra.obj cord\tests\de.obj cord\tests\de_win.obj cord\de_win.rbj gc64_dll.lib - $(link) $(ldebug) $(guiflags) -stack:16384 -out:cord\de.exe cord\cordbscs.obj cord\cordxtra.obj cord\tests\de.obj cord\tests\de_win.obj cord\de_win.rbj gc64_dll.lib $(guilibs) - -gc_cpp.obj: include\gc_cpp.h include\gc.h - -gc_cpp.cpp: gc_cpp.cc -# copy gc_cpp.cc gc_cpp.cpp - -test_cpp.cpp: tests\test_cpp.cc - copy tests\test_cpp.cc test_cpp.cpp - -# This generates the C++ test executable. The executable expects # a single numeric argument, which is the number of iterations. -# The output appears in the file "test_cpp.gc.log". -test_cpp.exe: test_cpp.obj include\gc_cpp.h include\gc.h gc64_dll.lib - $(link) $(ldebug) $(guiflags) -stack:16384 -out:test_cpp.exe test_cpp.obj gc64_dll.lib $(guilibs) - -$(AO_SRC_DIR): - tar xvfz $(AO_SRC_DIR).tar.gz; - -clean: - del *.exe *.log *.obj *.pdb cord\*.exe cord\*.exp cord\*.lib cord\*.obj cord\*.pdb cord\*.rbj cord\*.res cord\tests\*.obj extra\*.obj gc*.lib gc*.dll gc*.exp test_cpp.cpp tests\*.obj 2> nul -- 2.40.0