FW: Could not compile hamachi-v0.14 on Alpha-2.2.[36]

Eric Kasten kasten@nscl.msu.edu
Thu Apr 22 10:04:15 1999


For the sake of creativity, try this Makefile:

...Eric


Eric Kasten
kasten@nscl.msu.edu
National Superconducting Cyclotron Lab
(517) 333-6412

---------------------- Start Makefile --------------------------
# What's the architecture 
ARCH := $(shell uname -m)

INCL=-I/usr/src/linux/include
CC=gcc

all: flags hamachi setintr

flags::
ifneq (,($findstring 86,$(ARCH)))
	@echo "Setting up for an x86..."
CFLAGS=-D__KERNEL__ -Wall -Wstrict-prototypes -O6 -fomit-frame-pointer -pipe -ffixed-8 -mcpu=$(ARCH) -DBWIO_ENABLED -DMODULE
else
	@echo "Setting up for an Alpha..."
CFLAGS=-D__KERNEL__ -Wall -Wstrict-prototypes -O6 -fomit-frame-pointer -pipe -mno-fp-regs -ffixed-8 -mcpu=$(ARCH) -Wa,-m21164a -DBWIO_ENABLED -DMODULE
endif


hamachi: hamachi.c
	$(CC) $(CFLAGS) $(INCL) -o hamachi.o -c hamachi.c

setintr: setintr.c
	$(CC) $(CFLAGS) $(INCL) -o setintr setintr.c

install: hamachi
	install -m 644 hamachi.o /lib/modules/`uname -r`/net/

------------------------- end of Makefile ----------------------------



> Here's what I use:
> 
> CFLAGS=-D__KERNEL__ -Wall -Wstrict-prototypes -O6 -fomit-frame-pointer -pipe -mno-fp-regs -ffixed-8 -mcpu=ev56 -Wa,-m21164a -DBWIO_ENABLED -DMODULE
> INCL=-I/usr/src/linux/include
> 
> hamachi_rx.o: hamachi.c
>         gcc -DRX_CHECKSUM $(CFLAGS) $(INCL) -c -o $@ $<
> 
> 
> Watch the compilation of other kernel modules to see where I got these
> from.  If you're clever, you can have your Makefile invoke the one in
> the kernel source, something like:
> 
> hamachi.o: hamachi.c
>         (cd /usr/src/linux; EXTRA_CFLAGS=-DRX_CHECKSUM make SUBDIRS=$$(pwd) $@)
> 
> But I've not been that clever myself.
> 
> 		-- Pete
> 
 | To unsubscribe, send mail to Majordomo@cesdis.gsfc.nasa.gov, and within the
 |  body of the mail, include only the text:
 |   unsubscribe this-list-name youraddress@wherever.org
 | You will be unsubscribed as speedily as possible.