Build legacy drivers and publish per-OS packages with web activation and DEB

This commit is contained in:
2026-11-27 20:55:31 +00:00
96 changed files with 3204 additions and 25 deletions

View File

@@ -5,8 +5,8 @@ CPPFLAGS += -D_DEFAULT_SOURCE
all: build/mars-pcapd build/libmarspcap.a
build:
mkdir -p $@
build/mars-pcapd: src/broker.c src/wire.c src/pcap_dyn.c src/wire.h src/pcap_dyn.h | build
$(CC) $(CPPFLAGS) $(CFLAGS) -std=c11 src/broker.c src/wire.c src/pcap_dyn.c -ldl -o $@
build/mars-pcapd: src/broker.c src/wire.c src/pcap_dyn.c src/ipxpkt.c src/gateway.c src/dhcp.c src/gateway_config.c src/gateway.h src/ipxpkt.h src/wire.h src/pcap_dyn.h | build
$(CC) $(CPPFLAGS) $(CFLAGS) -std=c11 src/broker.c src/wire.c src/pcap_dyn.c src/ipxpkt.c src/gateway.c src/dhcp.c src/gateway_config.c $(shell pkg-config --cflags --libs json-c) -ldl -o $@
build/shim.o: src/shim.c src/shim.h src/wire.h | build
$(CC) $(CPPFLAGS) $(CFLAGS) -std=c11 -c $< -o $@
build/libmarspcap.a: build/shim.o
@@ -27,8 +27,8 @@ NATIVE_FLAGS = $(shell pkg-config --cflags json-c openssl)
NATIVE_LIBS = $(shell pkg-config --libs json-c openssl) -pthread
.PHONY: native check-native
native: build/mars_vme build/mars-print
build/mars_vme: native/main.c native/core.c native/supervisor.c native/admin.c native/printing.c native/core.h native/supervisor.h native/admin.h | build
$(CC) $(CFLAGS) -std=c11 $(NATIVE_FLAGS) $(CIVET_CFLAGS) native/main.c native/core.c native/supervisor.c native/admin.c native/printing.c -o $@ $(CIVET_LIBS) $(NATIVE_LIBS) -ldl
build/mars_vme: native/main.c native/core.c native/supervisor.c native/admin.c native/printing.c native/gateway_auto.c src/gateway_config.c src/gateway.h native/gateway_auto.h native/core.h native/supervisor.h native/admin.h | build
$(CC) $(CFLAGS) -std=c11 $(NATIVE_FLAGS) $(CIVET_CFLAGS) native/main.c native/core.c native/supervisor.c native/admin.c native/printing.c native/gateway_auto.c src/gateway_config.c -o $@ $(CIVET_LIBS) $(NATIVE_LIBS) -ldl
build/test-native: tests/test_native.c native/core.c native/core.h | build
$(CC) $(CFLAGS) -std=c11 -Inative $(NATIVE_FLAGS) tests/test_native.c native/core.c -o $@ $(NATIVE_LIBS)
check-native: build/test-native
@@ -64,3 +64,62 @@ check-trustee: build/test-trustee
./build/test-trustee
build/test-trustee: tests/test_trustee.c upstream-adapter/mars_trustee.inc | build
$(CC) $(CFLAGS) -std=c11 tests/test_trustee.c -o $@
.PHONY: check-gateway
check-gateway: build/test-gateway
./build/test-gateway
build/test-gateway: tests/test_gateway.c src/ipxpkt.c src/gateway_config.c src/gateway.h src/ipxpkt.h | build
$(CC) $(CPPFLAGS) $(CFLAGS) -std=c11 -Isrc tests/test_gateway.c src/ipxpkt.c src/gateway_config.c -o $@ $(shell pkg-config --cflags --libs json-c)
.PHONY: check-gateway-auto
check-gateway-auto: build/test-gateway-auto
./build/test-gateway-auto
build/test-gateway-auto: tests/test_gateway_auto.c native/gateway_auto.c native/gateway_auto.h native/core.c src/dhcp.c src/gateway_config.c src/gateway.h | build
$(CC) $(CPPFLAGS) $(CFLAGS) -std=c11 -Isrc $(NATIVE_FLAGS) tests/test_gateway_auto.c native/gateway_auto.c native/core.c src/dhcp.c src/gateway_config.c -o $@ $(NATIVE_LIBS)
.PHONY: check-winclient
check-winclient: build/test-winclient
./build/test-winclient
build/test-winclient: tests/test_winclient.c clients/windows/client_core.c clients/windows/client_core.h clients/windows/ndis5/frame_queue.c clients/windows/ndis5/frame_queue.h src/ipxpkt.c src/ipxpkt.h src/dhcp.c src/gateway.h | build
$(CC) $(CPPFLAGS) $(CFLAGS) -std=c11 -Isrc -Iclients/windows -Iclients/windows/ndis5 tests/test_winclient.c clients/windows/client_core.c clients/windows/ndis5/frame_queue.c src/ipxpkt.c src/dhcp.c -o $@ $(shell pkg-config --cflags --libs json-c)
# Cross targets are explicitly development candidates, not validated Windows packages.
.PHONY: windows-tools windows-all windows95 windows98 windowsme windowsnt4 windows2000 windowsxp windows-diag windows-watcom windows-nt5
windows-tools:
./cross/install-tools.sh
windows-all:
./build-windows.sh
windows95:
./build-windows.sh --no-install WIN95
windows98:
./build-windows.sh --no-install WIN98
windowsme:
./build-windows.sh --no-install WINME
windowsnt4:
./build-windows.sh --no-install WINNT40
windows2000:
./build-windows.sh --no-install WIN2000
windowsxp:
./build-windows.sh --no-install WINXP
windows-diag:
./cross/build-diag.sh
windows-watcom:
./cross/watcom-check.sh
windows-nt5:
./cross/build-nt5.sh
.PHONY: windows-legacy-tools windows-legacy check-legacy
windows-legacy-tools:
./cross/fetch-legacy.sh --accept-archive
windows-legacy:
./cross/build-legacy.sh
build/test-legacy: tests/test_legacy.c clients/windows/ndis3/legacy_core.c clients/windows/ndis3/legacy_core.h clients/windows/ndis5/frame_queue.c | build
$(CC) $(CFLAGS) -std=c89 -pedantic -DMARS_LEGACY_KERNEL -Iclients/windows/ndis3 tests/test_legacy.c clients/windows/ndis3/legacy_core.c clients/windows/ndis5/frame_queue.c -o $@
check-legacy: build/test-legacy
./build/test-legacy
.PHONY: windows-all-legacy windows-legacy-bridge
windows-all-legacy:
./build-windows.sh --with-legacy-ddk
windows-legacy-bridge:
./cross/build-legacy-bridge.sh