-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
asmpkt.asm vs asmpkt.nas question #118
Comments
Yes and on Windows, It's a bit complicated:
|
--- WATCOM_L.MAK 2024-07-27 13:42:20.000000000 +1000
+++ WATCOM_F.MAK 2024-07-27 13:42:20.000000000 +1000
@@ -133,7 +133,6 @@
#
DOS_OBJS = &
- $(OBJPATH)asmpkt.obj &
$(OBJPATH)country.obj &
$(OBJPATH)fsext.obj &
$(OBJPATH)pcpkt32.obj &
@@ -157,6 +156,12 @@
#
OBJS = $(COMMON_OBJS) $(DOS_OBJS)
+#
+# This generated file is used for all 32-bit MSDOS targets
+# (and when USE_FAST_PKT is defined). This enables a faster real-mode
+# callback for the PKTDRVR receiver. Included as an array in pcpkt2.c.
+#
+PKT_STUB = pkt_stub.h
########################################################################
@@ -182,12 +187,12 @@
AS = *wasm
AR = *wlib
-CC = *wcc
-CFLAGS = -bt=dos -ml -0 -os -s -zc -zm -zlf -DWATT32_STATIC
-AFLAGS = -bt=dos
-STAT_LIB = $(LIBPATH)wattcpwl.lib
-OBJDIR = $(OBJROOT)large
-I_CFLAGS = -I"$(%WATCOM)/h"
+CC = *wcc386
+CFLAGS = -bt=dos -mf -3r -zff -zgf -oilrtfm -s -zlf -DWATT32_STATIC
+AFLAGS = -bt=dos -3r -dDOSX -dDOS4GW
+STAT_LIB = $(LIBPATH)wattcpwf.lib
+OBJDIR = $(OBJROOT)flat
+I_CFLAGS = -I"$(%WATCOM)/h" # -I"$(%PHARLAP)/include"
LIB_ARGS = $(OBJPATH)wlib.arg
@@ -308,6 +313,12 @@
@%append $^@ const char *w32_cc = "$(CC)";
+$(OBJPATH)pcpkt.obj: asmpkt.nas
+
+$(PKT_STUB): asmpkt.nas
+ $(W32_NASM) -f bin -l asmpkt.lst -o asmpkt.bin asmpkt.nas
+ $(W32_BIN2C) asmpkt.bin > $@
+ --- WATCOM_F.MAK 2024-07-27 13:42:20.000000000 +1000
+++ WATCOM_W.MAK 2024-07-27 13:42:20.000000000 +1000
@@ -152,16 +152,13 @@
SUFFIX =
#
-# For all 16/32-bit DOS targets:
+# For all 32/64-bit Windows targets:
#
-OBJS = $(COMMON_OBJS) $(DOS_OBJS)
+OBJS = $(COMMON_OBJS) $(WINDOWS_OBJS)
+
+
+
-#
-# This generated file is used for all 32-bit MSDOS targets
-# (and when USE_FAST_PKT is defined). This enables a faster real-mode
-# callback for the PKTDRVR receiver. Included as an array in pcpkt2.c.
-#
-PKT_STUB = pkt_stub.h
########################################################################
@@ -188,11 +185,15 @@
AR = *wlib
CC = *wcc386
-CFLAGS = -bt=dos -mf -3r -zff -zgf -oilrtfm -s -zlf -DWATT32_STATIC
-AFLAGS = -bt=dos -3r -dDOSX -dDOS4GW
-STAT_LIB = $(LIBPATH)wattcpwf.lib
-OBJDIR = $(OBJROOT)flat
-I_CFLAGS = -I"$(%WATCOM)/h" # -I"$(%PHARLAP)/include"
+CFLAGS = -bt=nt -mf -3r -fp6 -oilrtfm -s -bm -zri -zlf
+AFLAGS = -bt=nt -3s -dDOSX
+LDFLAGS = system nt_dll
+STAT_LIB = $(LIBPATH)wattcpww.lib
+IMP_LIB = $(LIBPATH)wattcpww_imp.lib
+WATT_DLL = $(DLLPATH)watt-32.dll
+OBJDIR = $(OBJROOT)win32
+RESOURCE = $(OBJPATH)watt-32.res
+I_CFLAGS = -I"$(%WATCOM)/h" -I"$(%WATCOM)/h/nt"
LIB_ARGS = $(OBJPATH)wlib.arg
@@ -254,11 +255,16 @@
# s: favour code size over execution time
#
-TARGETS = $(STAT_LIB)
+TARGETS = $(STAT_LIB) $(IMP_LIB) $(WATT_DLL)
all: $(PKT_STUB) $(OBJPATH)cflags.h $(OBJPATH)cflagsbf.h $(TARGETS) .SYMBOLIC
@echo All done
+$(IMP_LIB): $(WATT_DLL)
+ @%null
+
+$(WATT_DLL): $(OBJS) $(RESOURCE) $(LINK_ARGS)
+ *wlink $(LDFLAGS) name $^@ @$(LINK_ARGS)
$(STAT_LIB): $(OBJS) $(LIB_ARGS)
$(AR) -q -b -c -pa -z=export.tmp $^@ @$(LIB_ARGS)
@@ -281,6 +287,14 @@
%create $^@
@for %f in ($(OBJS)) do @%append $^@ +- %f
+$(LINK_ARGS): $(__MAKEFILES__)
+ %create $^@
+ @%append $^@ option quiet, verbose
+ @%append $^@ debug all
+ @%append $^@ opt map=$(WATT_DLL:.dll=.map)
+ @%append $^@ opt implib=$(IMP_LIB), res=$(RESOURCE)
+ @%append $^@ reference __DLLstart_
+ @for %f in ($(OBJS)) do @%append $^@ file %f
clean: .SYMBOLIC
@if exist $(OBJPATH)*.obj $(RM) $(OBJPATH)*.obj
@@ -293,6 +307,11 @@
!ifdef PKT_STUB
@if exist $(PKT_STUB) $(RM) $(PKT_STUB)
!endif
+ @if exist $(LINK_ARGS) $(RM) $(LINK_ARGS)
+ @if exist $(WATT_DLL) $(RM) $(WATT_DLL)
+ @if exist $(IMP_LIB) $(RM) $(IMP_LIB)
+ @if exist $(RESOURCE) $(RM) $(RESOURCE)
+ @if exist $(WATT_DLL:.dll=.map) $(RM) $(WATT_DLL:.dll=.map)
@echo Cleaning done
########################################################################
@@ -313,12 +332,11 @@
@%append $^@ const char *w32_cc = "$(CC)";
-$(OBJPATH)pcpkt.obj: asmpkt.nas
-$(PKT_STUB): asmpkt.nas
- $(W32_NASM) -f bin -l asmpkt.lst -o asmpkt.bin asmpkt.nas
- $(W32_BIN2C) asmpkt.bin > $@
+DEBUGRC = 0
+$(RESOURCE): watt-32.rc
+ *wrc -q -bt=nt -dDEBUG=0 -D__WATCOMC__ -r -zm -fo=$^@ $< Are these shortcomings in the existing Watcom makefile generation? |
I'm a bit rusty on the details now, but....
Besides, some code has references to a now defunct |
That sounds like a big job for the future. For the time being I'll implement |
While reading
watcom_f.mak
I noticed this snippet of codeWhich shares a name with another assembly file earlier in the makefile
Judging from the comments in both files it sounds like
asmpkt.nas
is an optional 32-bit DOS feature but requiresnasm
to build?The text was updated successfully, but these errors were encountered: