From 4d68389e7f17880f805253443bc751693450ec33 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Fri, 1 Jun 2018 11:58:30 +0300 Subject: [PATCH] Fix compilation by digimars.mak (DMC) Also, the script now builds test_cpp executable. * digimars.mak (DEFINES): Remove -D NDEBUG; replace -D WIN32_THREADS to -D GC_THREADS. * digimars.mak (CFLAGS): Add -I libatomic_ops\src. * digimars.mak (targets): Add test_cpp.exe. * digimars.mak (gc.dll, gctest.exe): Replace sc with $(CC). * digimars.mak (gc.def): Refine DESCRIPTION. * digimars.mak (clean): Also delete gc.dll, gc.lib, gc.map, gctest.map, test_cpp.map, tests\test.obj, gctest.exe, tests\test_cpp.obj, test_cpp.exe. * digimars.mak (test_cpp.exe, tests\test_cpp.obj): New rule. * digimars.mak (tests\test.obj): Replace compiler options with $(CFLAGS). --- digimars.mak | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/digimars.mak b/digimars.mak index 2d30d36..45572d1 100644 --- a/digimars.mak +++ b/digimars.mak @@ -2,9 +2,8 @@ # compiler from www.digitalmars.com # Written by Walter Bright - -DEFINES=-DNDEBUG -D_WINDOWS -DGC_DLL -DALL_INTERIOR_POINTERS -DENABLE_DISCLAIM -DWIN32_THREADS -CFLAGS=-Iinclude $(DEFINES) -wx -g +DEFINES=-D_WINDOWS -DGC_DLL -DALL_INTERIOR_POINTERS -DENABLE_DISCLAIM -DGC_THREADS +CFLAGS=-Iinclude -Ilibatomic_ops\src $(DEFINES) -wx -g LFLAGS=/ma/implib/co CC=sc @@ -39,31 +38,35 @@ OBJS= \ typd_mlc.obj\ win32_threads.obj -targets: gc.dll gc.lib gctest.exe +targets: gc.dll gc.lib gctest.exe test_cpp.exe gc.dll: $(OBJS) gc.def digimars.mak - sc -ogc.dll $(OBJS) -L$(LFLAGS) gc.def kernel32.lib user32.lib + $(CC) -ogc.dll $(OBJS) -L$(LFLAGS) gc.def kernel32.lib user32.lib gc.def: digimars.mak echo LIBRARY GC >gc.def - echo DESCRIPTION "Hans Boehm Garbage Collector" >>gc.def + echo DESCRIPTION "Boehm-Demers-Weiser Garbage Collector" >>gc.def echo EXETYPE NT >>gc.def echo EXPORTS >>gc.def echo GC_is_visible_print_proc >>gc.def echo GC_is_valid_displacement_print_proc >>gc.def clean: - del gc.def + del gc.def gc.dll gc.lib gc.map gctest.map test_cpp.map + del tests\test.obj gctest.exe tests\test_cpp.obj test_cpp.exe del $(OBJS) +gctest.exe: gc.lib tests\test.obj + $(CC) -ogctest.exe tests\test.obj gc.lib + +tests\test.obj: tests\test.c + $(CC) -c $(CFLAGS) tests\test.c -otests\test.obj -gctest.exe : gc.lib tests\test.obj - sc -ogctest.exe tests\test.obj gc.lib +test_cpp.exe: gc.lib tests\test_cpp.obj + $(CC) -otest_cpp.exe tests\test_cpp.obj gc.lib -tests\test.obj : tests\test.c - $(CC) -c -g -DNDEBUG -D_WINDOWS -DGC_DLL \ - -DALL_INTERIOR_POINTERS -DWIN32_THREADS \ - -Iinclude tests\test.c -otests\test.obj +tests\test_cpp.obj: tests\test_cpp.cc + $(CC) -c $(CFLAGS) -cpp tests\test_cpp.cc -otests\test_cpp.obj allchblk.obj: allchblk.c alloc.obj: alloc.c -- 2.7.4