]> granicus.if.org Git - gc/commitdiff
Fix compilation by digimars.mak (DMC)
authorIvan Maidanski <ivmai@mail.ru>
Fri, 1 Jun 2018 08:58:30 +0000 (11:58 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 1 Jun 2018 08:58:30 +0000 (11:58 +0300)
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

index 2d30d3658fbbf8ae08d54b1b61e2a6c4dbf535f6..45572d1dcffd71a3744158bb5a0f24574c93e986 100644 (file)
@@ -2,9 +2,8 @@
 # compiler from www.digitalmars.com\r
 # Written by Walter Bright\r
 \r
-\r
-DEFINES=-DNDEBUG -D_WINDOWS -DGC_DLL -DALL_INTERIOR_POINTERS -DENABLE_DISCLAIM -DWIN32_THREADS\r
-CFLAGS=-Iinclude $(DEFINES) -wx -g\r
+DEFINES=-D_WINDOWS -DGC_DLL -DALL_INTERIOR_POINTERS -DENABLE_DISCLAIM -DGC_THREADS\r
+CFLAGS=-Iinclude -Ilibatomic_ops\src $(DEFINES) -wx -g\r
 LFLAGS=/ma/implib/co\r
 CC=sc\r
 \r
@@ -39,31 +38,35 @@ OBJS=       \
        typd_mlc.obj\\r
        win32_threads.obj\r
 \r
-targets: gc.dll gc.lib gctest.exe\r
+targets: gc.dll gc.lib gctest.exe test_cpp.exe\r
 \r
 gc.dll: $(OBJS) gc.def digimars.mak\r
-       sc -ogc.dll $(OBJS) -L$(LFLAGS) gc.def  kernel32.lib user32.lib\r
+       $(CC) -ogc.dll $(OBJS) -L$(LFLAGS) gc.def kernel32.lib user32.lib\r
 \r
 gc.def: digimars.mak\r
        echo LIBRARY GC >gc.def\r
-       echo DESCRIPTION "Hans Boehm Garbage Collector" >>gc.def\r
+       echo DESCRIPTION "Boehm-Demers-Weiser Garbage Collector" >>gc.def\r
        echo EXETYPE NT >>gc.def\r
        echo EXPORTS >>gc.def\r
        echo GC_is_visible_print_proc >>gc.def\r
        echo GC_is_valid_displacement_print_proc >>gc.def\r
 \r
 clean:\r
-       del gc.def\r
+       del gc.def gc.dll gc.lib gc.map gctest.map test_cpp.map\r
+       del tests\test.obj gctest.exe tests\test_cpp.obj test_cpp.exe\r
        del $(OBJS)\r
 \r
+gctest.exe: gc.lib tests\test.obj\r
+       $(CC) -ogctest.exe tests\test.obj gc.lib\r
+\r
+tests\test.obj: tests\test.c\r
+       $(CC) -c $(CFLAGS) tests\test.c -otests\test.obj\r
 \r
-gctest.exe : gc.lib tests\test.obj\r
-       sc -ogctest.exe tests\test.obj gc.lib\r
+test_cpp.exe: gc.lib tests\test_cpp.obj\r
+       $(CC) -otest_cpp.exe tests\test_cpp.obj gc.lib\r
 \r
-tests\test.obj : tests\test.c\r
-       $(CC) -c -g -DNDEBUG -D_WINDOWS -DGC_DLL \\r
-       -DALL_INTERIOR_POINTERS -DWIN32_THREADS \\r
-       -Iinclude tests\test.c -otests\test.obj\r
+tests\test_cpp.obj: tests\test_cpp.cc\r
+       $(CC) -c $(CFLAGS) -cpp tests\test_cpp.cc -otests\test_cpp.obj\r
 \r
 allchblk.obj: allchblk.c\r
 alloc.obj: alloc.c\r