.ENDIF
LIB32 = tlib /P128
IMPLIB = implib -c
-RSC = rc
+RSC = brcc32
#
# Options
CXX_FLAG = -P
LIBC = cw32mti.lib
-LIBFILES = $(CRYPT_LIB) import32.lib $(LIBC)
+LIBFILES = $(CRYPT_LIB) ws2_32.lib import32.lib $(LIBC)
.IF "$(CFG)" == "Debug"
OPTIMIZE = -v -D_RTLDLL -DDEBUGGING
# require backslashes to be doubled-up when written to $(mktmp) files.
# Other dmake's do not require this and would actually output a double
# backslash if they were doubled-up.
-.IF "$(shell type $(mktmp \\))"=="\\"
+.IF "$(shell @type $(mktmp \\))"=="\\"
B=\\
.ELSE
B=\\\
.ENDIF
+# There is a related issue with other escape sequences: Sarathy's old
+# dmake automatically maps escape sequences like \n to their ASCII values
+# when used in macros, while other dmake's only do so if this behaviour
+# is explicitly requested with the :m modifier.
+DONTUSETHIS=\n
+.IF "$(shell @type $(mktmp \n))"=="\n"
+N=$(DONTUSETHIS:m)
+.ELSE
+N=$(DONTUSETHIS)
+.ENDIF
+
o *= .obj
a *= .lib
$(PERLDLL): perldll.def $(PERLDLL_OBJ) $(PERLDLL_RES) Extensions_static
.IF "$(CCTYPE)" == "BORLAND"
$(LINK32) -Tpd -ap $(BLINK_FLAGS) \
- @$(mktmp c0d32$(o) $(PERLDLL_OBJ:s,\,$B,)\n \
- $@,\n \
- $(LIBFILES)\n \
- perldll.def\n)
+ @$(mktmp c0d32$(o) $(PERLDLL_OBJ:s,\,$B,)$N \
+ $@,$N \
+ $(LIBFILES)$N \
+ perldll.def$N)
$(IMPLIB) $*.lib $@
.ELIF "$(CCTYPE)" == "GCC"
$(LINK32) -mdll -o $@ -Wl,--base-file -Wl,perl.base $(BLINK_FLAGS) \
$(PERLEXE): $(PERLDLL) $(CONFIGPM) $(PERLEXE_OBJ) $(PERLEXE_RES)
.IF "$(CCTYPE)" == "BORLAND"
$(LINK32) -Tpe -ap $(BLINK_FLAGS) \
- @$(mktmp c0x32$(o) $(PERLEXE_OBJ:s,\,$B,)\n \
- $(@:s,\,$B,),\n \
- $(PERLIMPLIB) $(LIBFILES)\n)
+ @$(mktmp c0x32$(o) $(PERLEXE_OBJ:s,\,$B,)$N \
+ $(@:s,\,$B,),$N \
+ $(PERLIMPLIB) $(LIBFILES)$N)
.ELIF "$(CCTYPE)" == "GCC"
$(LINK32) -mconsole -o $@ $(BLINK_FLAGS) \
$(PERLEXE_OBJ) $(PERLIMPLIB) $(LIBFILES)