Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 43268
Collapse All | Expand All

(-)Makefile (-25 / +25 lines)
Lines 1-25 Link Here
1
CC =$(shell if which kgcc > /dev/null 2>&1; then echo kgcc; else echo gcc; fi)
1
CC =$(shell if which kgcc > /dev/null 2>&1; then echo kgcc; else echo gcc; fi)
2
2
3
SRCPATH =$(shell if uname -r | grep '2.4' > /dev/null 2>&1; then echo /usr/src/linux-2.4; else echo /usr/src/linux; fi)
3
SRCPATH =$(shell if uname -r | grep '2.4' > /dev/null 2>&1; then echo /usr/src/linux; else echo /usr/src/linux; fi)
4
4
5
CFLAGS =-D__KERNEL__ -DMODULE $(shell if uname -r | grep '2.4.2-2' > /dev/null 2>&1; then echo "-DEXPORT_SYMTAB"; fi) -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
5
CFLAGS =-D__KERNEL__ -DMODULE $(shell if uname -r | grep '2.4.2-2' > /dev/null 2>&1; then echo "-DEXPORT_SYMTAB"; fi) -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
6
6
7
CFLAGS += $(shell if $(CC) -fno-strict-aliasing -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo -fno-strict-aliasing; fi)
7
CFLAGS += $(shell if $(CC) -fno-strict-aliasing -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo -fno-strict-aliasing; fi)
8
8
9
9
10
OBJS = iteraid.o
10
OBJS = iteraid.o
11
iteraid.o:iteraid.c iteraid.h
11
iteraid.o:iteraid.c iteraid.h
12
	$(CC) $(CFLAGS) $(shell if uname -r | grep '2.2.' > /dev/null 2>&1; then echo "-DMODVERSIONS"; fi) -I. -I$(SRCPATH)/drivers/scsi -I$(SRCPATH)/include -include $(SRCPATH)/include/linux/modversions.h -c -o iteraid.o iteraid.c
12
	$(CC) $(CFLAGS) $(shell if uname -r | grep '2.2.' > /dev/null 2>&1; then echo "-DMODVERSIONS"; fi) -I. -I$(SRCPATH)/drivers/scsi -I$(SRCPATH)/include -include $(SRCPATH)/include/linux/modversions.h -c -o iteraid.o iteraid.c
13
13
14
SMPOBJS = iteraid.smp
14
SMPOBJS = iteraid.smp
15
iteraid.smp:iteraid.c iteraid.h
15
iteraid.smp:iteraid.c iteraid.h
16
	$(CC) $(CFLAGS) -D__SMP__ $(shell if echo $(CC) | grep 'kgcc' > /dev/null 2>&1 || uname -r | grep '2.4' > /dev/null 2>&1; then echo "-D__module__smp"; fi) $(shell if uname -r | grep '2.2.' > /dev/null 2>&1; then echo "-DMODVERSIONS"; fi) -I. -I$(SRCPATH)/drivers/scsi -I$(SRCPATH)/include -include $(SRCPATH)/include/linux/modversions.h -c -o iteraid.smp iteraid.c
16
	$(CC) $(CFLAGS) -D__SMP__ $(shell if echo $(CC) | grep 'kgcc' > /dev/null 2>&1 || uname -r | grep '2.4' > /dev/null 2>&1; then echo "-D__module__smp"; fi) $(shell if uname -r | grep '2.2.' > /dev/null 2>&1; then echo "-DMODVERSIONS"; fi) -I. -I$(SRCPATH)/drivers/scsi -I$(SRCPATH)/include -include $(SRCPATH)/include/linux/modversions.h -c -o iteraid.smp iteraid.c
17
17
18
up: $(OBJS)
18
up: $(OBJS)
19
19
20
all: $(OBJS) $(SMPOBJS)
20
all: $(OBJS) $(SMPOBJS)
21
21
22
smp: $(SMPOBJS)
22
smp: $(SMPOBJS)
23
23
24
clean:
24
clean:
25
	rm -rf iteraid.o iteraid.smp *~
25
	rm -rf iteraid.o iteraid.smp *~

Return to bug 43268