Rick McNeal wrote:
Suggestions?
I maintain a out of tree network driver (or really, the upstream
source for an in-tree driver that I build out of tree).
Here are some snippets from my driver's out of tree Makefile
that you may find helpful.
#32-bit flags
#CFLAGS = -Di86pc
# 64-bit flags
CFLAGS = -m64 -xarch=sse2a -Di86pc -xmodel=kernel
CFLAGS += -g -xdebugformat=dwarf
CFLAGS += -xO2
CFLAGS += -D_KERNEL
CC = /opt/SUNWspro/bin/cc
LD = /usr/ccs/bin/ld
SRC = some.c another.c
OBJECTS = $(SRC:.c=.o)
mydriver: $(OBJECTS)
$(LD) -dy -r -o $@ $(OBJECTS) -N misc/mac -N strmod/ip -N
misc/zmod
ctfmerge -g -L LABEL -o $@ $(OBJECTS)
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
ctfconvert -i -g -L LABEL $@
Cheers,
Drew
_______________________________________________
driver-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/driver-discuss