|
|
1.1 root 1: CC = gcc
2: LD = ld
3:
4: KERNEL = /usr/src/linux
5: #KERNEL = /lib/modules/`uname -r`/build
6:
7: ARCH = $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/)
8:
9: ifeq ($(KERNEL)/.config,$(wildcard $(KERNEL)/.config))
10: include $(KERNEL)/.config
11: endif
12:
13: CFLAGS = -D__KERNEL__ -I${KERNEL}/include -Wall \
14: -Wstrict-prototypes -Wno-trigraphs -O2 \
15: -fomit-frame-pointer -fno-common \
16: -fno-strict-aliasing -pipe -DMODULE
17:
18: # comment this if you don't want debugging information
19: CFLAGS += -DDEBUG
20:
21: # see if we need module versions
22: ifdef CONFIG_MODVERSIONS
23: CFLAGS += -DMODVERSIONS
24: endif
25:
26: ifeq ($(ARCH),alpha)
27: CFLAGS += -mno-fp-regs -ffixed-8 -mcpu=ev5 -Wa,-mev6
28: LDFLAGS = -m elf64alpha
29: endif
30:
31: ifeq ($(ARCH),sparc64)
32: CFLAGS += -mno-fpu -mtune=ultrasparc -mmedlow -ffixed-g4 \
33: -fcall-used-g5 -fcall-used-g7
34: LDFLAGS = -m elf_sparc64
35: endif
36:
37: ifeq ($(ARCH),i386)
38: CFLAGS += -mpreferred-stack-boundary=2 -march=i586
39: LDFLAGS = -m elf_i386
40: endif
41:
42: ifeq ($(ARCH), x86_64)
43: CFLAGS += -mno-red-zone -mcmodel=kernel -fno-reorder-blocks \
44: -finline-limit=2000 -fno-strength-reduce
45: LDFLAGS = -m elf_x86_64
46: endif
47:
48: ifeq ($(ARCH),ia64)
49: CFLAGS += -ffixed-r13 -mfixed-range=f10-f15,f32-f127 \
50: -falign-functions=32
51: LDFLAGS = -m elf64_ia64
52: endif
53:
54: .SUFFIXES: .o .c .h
55:
56: TARGET = bios.o
57: OBJS = bios_core.o flashchips.o pcisets.o \
58: filesystem.o procfs.o programming.o
59:
60: all: $(TARGET) comp
61:
62: $(TARGET): $(OBJS)
63: $(LD) $(LDFLAGS) -r -o $(TARGET) $(OBJS)
64:
65: clean:
66: -rm -f $(TARGET) $(OBJS) comp *.o
67:
68: .c.o:
69: $(CC) $(INCLUDES) -c $(INCDIRS) $(CFLAGS) $(X_CFLAGS) $(DEBUGFLAGS) $*.c -o $@
70:
71: comp: comp.c
72: $(CC) comp.c -O2 -o comp
73: strip comp
74:
75: bios_core.o: bios_core.c bios.h pcisets.h flashchips.h programming.h
76: filesystem.o: filesystem.c bios.h pcisets.h flashchips.h programming.h
77: flashchips.o: flashchips.c bios.h flashchips.h
78: pcisets.o: pcisets.c bios.h pcisets.h flashchips.h programming.h
79: procfs.o: procfs.c bios.h pcisets.h flashchips.h programming.h
80: programming.o: programming.c bios.h pcisets.h flashchips.h programming.h
81:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.