aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: b63bdd6897a936431b2d10138b7b24e74a11cdfb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
KERNEL_PATH=/usr/src/linux

CC=gcc
INCLUDES=-I$(KERNEL_PATH)/include
CFLAGS=-O2 -D__KERNEL__ -DMODULE -fomit-frame-pointer -Wall -c

.c.o:
	$(CC) $(INCLUDES) $(CFLAGS) -o $@ $<

all:	untar prism2.o install_info

untar:
	@tar xzf ../prism2-0.0.0.tar.gz
	@mv modules/* .

prism2.o: prism2.c prism2_wlan.h prism2_ap.c prism2_ap.h

install_info:
	@echo "Run 'make install' as a root to install prism2.o"

install:
	@echo "Installing to /lib/modules/`uname -r`/pcmcia"
	mkdir -p /lib/modules/`uname -r`/pcmcia
	cp prism2.o /lib/modules/`uname -r`/pcmcia
	depmod -a
	@if [ ! -r /etc/pcmcia/prism2.conf ]; then \
		echo "Installing prism2.conf to /etc/pcmcia"; \
		cp etc/prism2.conf /etc/pcmcia/prism2.conf; \
	fi

clean:
	rm -f prism2.o