File: Makefile

package info (click to toggle)
nw802 0.0.99-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 244 kB
  • ctags: 375
  • sloc: ansic: 3,058; makefile: 174
file content (35 lines) | stat: -rw-r--r-- 1,399 bytes parent folder | download
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
33
34
35
# GCC stuff
GCCLIB=`dirname \`gcc -print-libgcc-file-name\``
#INCLUDES=-nostdinc -I /usr/src/linux/include -I ${GCCLIB}/include/ -include /usr/src/linux/include/linux/modversions.h
INCLUDES=-nostdinc -I $(KSRC)/include -I ${GCCLIB}/include/ -include $(KSRC)/include/linux/modversions.h
#CFLAGS=-O2 -D__KERNEL__ -DMODULE -Wall -DMODVERSIONS -nostdinc -ggdb 
CFLAGS=-O3 -D__KERNEL__ -DMODULE -Wall -DMODVERSIONS -funroll-loops -frerun-cse-after-loop -funroll-all-loops -fomit-frame-pointer
#CFLAGS=-O3 -D__KERNEL__ -DMODULE -Wall -DMODVERSIONS -nostdinc -march=pentium4 -msse -msse2 -m3dnow -mmmx -mfpmath=sse -funroll-loops -frerun-cse-after-loop -funroll-all-loops -fomit-frame-pointer
CC=gcc

OBJ=nw802.o usbvideo.o

# Build rules

all: $(OBJ)

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

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

nw802.o: nw802.c usbvideo.o nw8xx_jpgl.o nw802.init nw801.init nw800.init
	$(CC) $(CFLAGS) $(INCLUDES) -c -o nw802_core.o $< 
	$(LD) -r -o $@ nw802_core.o nw8xx_jpgl.o

nw8xx_regedit: nw8xx_regedit.c
	$(CC) $(CFLAGS) `pkg-config gtk+-2.0 --cflags --libs` -o $@ $<

clean:
	rm -f *.so *.o *~ *.swp $(OBJ)

install:
	mkdir -p $(DESTDIR)/lib/modules/$(KVERS)/usb
	install --mode=644 nw802.o $(DESTDIR)/lib/modules/$(KVERS)/usb
	install --mode=644 nw8xx_jpgl.o $(DESTDIR)/lib/modules/$(KVERS)/usb