Files
Zorro-LAN-IDE/Driver/baxnet/source/smakefile.v4
T
Henryk Richter 52ba722800 Updated Zorro-LAN-IDE Driver to 2.15
- Multicast fixes
- new Microchip OUIs added to verification table
2026-03-02 10:41:17 +01:00

166 lines
5.1 KiB
Plaintext

###############################################################################
#
# SAS/C Makefile for V4 ETH
#
# author: Henryk Richter <henryk.richter@gmx.net>
#
# tools required:
# working SAS/C installation (sc:, sc:include and sc:netinclude assigned,
# "sc", "smake" and "slink in path)
# vasm in path (vasmm68k_mot)
#
###############################################################################
###############################################################################
# Name, version
#
###############################################################################
#DEVICEVERSION=1
#DEVICEREVISION=95
#DEVICEDATE=08.09.2018
#DEVICEEXTRA=Beta
SUBDIR=v4net
ASMOBJECTS = $(SUBDIR)/vampuuid.o$(TYPE) $(SUBDIR)/intervaltimer.o$(TYPE) \
$(SUBDIR)/v4l.o$(TYPE) kprintf.o$(TYPE)
#
# more than one flavour of the same code base may be build with this setup
#
# some arguments are passed down recursively (example):
#DEVICEID=v4net.device
#DEFINES1 = DEFINE HW_DMA_TX=1
#ASMDEFS1 = -DHW_DMA_TX
#CPU = 68020
###############################################################################
#
# common.smk (SAS/C variant of common.mk)
#
# author: Henryk Richter <henryk.richter@gmx.net>
#
# note: when switching between different hardware targets, don`t forget
# "make clean" in between
###############################################################################
# debug = 1 will include string debugging for terminal/sushi/sashimi
# not enabled yet in SAS/C makefile
debug = 0
###############################################################################
# prefix for system includes (ASM)
#
###############################################################################
PREFX = sc:
SYSINC = $(PREFX)include
###############################################################################
#
# compiler executables and support calls
#
###############################################################################
RM = delete force quiet
CC = sc
LD = slink
MAKE = smake
CFLAGS = NOVER NOICONS nostackcheck math=standard strmerge strsect=code parameters=regs data=near opt optsize
LDFLAGS = NOICONS SC SD ND
VASM = vasmm68k_mot
VASMFORMAT = -m$(CPU) -Fhunk -nowarn=2064 -quiet -I$(SYSINC)
###############################################################################
#
# paths to the local includes
#
###############################################################################
IPATH =
###############################################################################
#
# compile-level feature definitions
#
###############################################################################
# see all: target for defaults in $(DEFINES)
DEFINES = $(DEFINES1) CPU=$(CPU)
DEFINES = $(DEFINES) DEFINE ALLREADREQS=1
#DEFINES = $(DEFINES) DEFINE DEVICEVERSION=$(DEVICEVERSION)
#DEFINES = $(DEFINES) DEFINE DEVICEREVISION=$(DEVICEREVISION)
#DEFINES = $(DEFINES) DEFINE DEVICEDATE=$(DEVICEDATE)
#DEFINES = $(DEFINES) DEFINE DEVICEEXTRA=$(DEVICEEXTRA)
DEFINES = $(DEFINES) DEFINE NEWSTYLE=1
DEFINES = $(DEFINES) DEFINE HAVE_VERSION_H=1
DEFINES = $(DEFINES) DEFINE DEVICENAME=$(DEVICEID)
ASMDEFS = $(ASMDEFS1)
#-DDEVICEVERSION=$(DEVICEVERSION) -DDEVICEREVISION=$(DEVICEREVISION)
###############################################################################
#
# debug
#
###############################################################################
#ifeq ($(debug),1)
#CFLAGS += -DDEBUG -g
#CFLAGS2 += -DDEBUG -g
#LINKLIBS = -L$(PREFX)/lib -ldebug
#endif
###############################################################################
#
# compiler flags and optimization levels
#
###############################################################################
CFLAGS = $(CFLAGS) INCLUDEDIR="" INCLUDEDIR=$(SUBDIR) $(DEFINES)
###############################################################################
#
# objects to build
#
###############################################################################
# ASM based alternative to deviceheader.o would be romtag.o
OBJECTS = deviceheader.o$(TYPE) deviceinit.o$(TYPE) device.o$(TYPE) \
server.o$(TYPE) $(SUBDIR)/hw.o$(TYPE)
OBJECTS = $(OBJECTS) $(ASMOBJECTS)
BUILDDEPS = device.h server.h hw.h macros.h compiler.h
###############################################################################
#
# rules and commands
#
###############################################################################
.asm.o$(TYPE): $(BUILDDEPS) $*.asm
$(VASM) $(VASMFORMAT) $(ASMDEFS) -o $@ $*.asm
.c.o$(TYPE): $(BUILDDEPS) $*.c
$(CC) $(CFLAGS) OBJECTNAME $@ $*.c
all:
$(MAKE) -f smakefile.v4 TYPE=4 v4net.device DEVICEID=v4net.device CPU=68020
v4net.device: $(OBJECTS)
-$(LD) $(OBJECTS) LIB sc:lib/sc.lib $(LDFLAGS) TO $(DEVICEID)
clean:
-$(RM) v4net.device \#?.o4 $(SUBDIR)/\#?.o4
install:
copy v4net.device DEVS:Networks
# dependencies
device.o$(TYPE): device.c device.h server.h hw.h macros.h compiler.h
server.o$(TYPE): server.c device.h server.h hw.h macros.h compiler.h
deviceinit.o$(TYPE): deviceinit.c device.h server.h hw.h macros.h compiler.h
deviceheader.o$(TYPE): deviceheader.c device.h server.h hw.h macros.h compiler.h