|
|
1.1 root 1: ###############################################################################
2: #
3: # Initialise various variables
4: #
5:
6: CLEANUP :=
7: CFLAGS :=
8: ASFLAGS :=
9: LDFLAGS :=
10: MAKEDEPS := Makefile
11:
12: ###############################################################################
13: #
14: # Locations of tools
15: #
16: HOST_CC := gcc
17: RM := rm -f
18: TOUCH := touch
19: MKDIR := mkdir
20: CP := cp
21: ECHO := echo
22: PRINTF := printf
23: PERL := perl
24: TRUE := true
25: CC := $(CROSS_COMPILE)gcc
26: CPP := $(CC) -E
27: AS := $(CROSS_COMPILE)as
28: LD := $(CROSS_COMPILE)ld
29: SIZE := $(CROSS_COMPILE)size
30: AR := $(CROSS_COMPILE)ar
31: RANLIB := $(CROSS_COMPILE)ranlib
32: OBJCOPY := $(CROSS_COMPILE)objcopy
33: NM := $(CROSS_COMPILE)nm
34: OBJDUMP := $(CROSS_COMPILE)objdump
35: PARSEROM := ./util/parserom.pl
36: FIXROM := ./util/fixrom.pl
37: SYMCHECK := ./util/symcheck.pl
38: SORTOBJDUMP := ./util/sortobjdump.pl
39: PADIMG := ./util/padimg.pl
40: LICENCE := ./util/licence.pl
41: NRV2B := ./util/nrv2b
42: ZBIN := ./util/zbin
43: ELF2EFI32 := ./util/elf2efi32
44: ELF2EFI64 := ./util/elf2efi64
45: EFIROM := ./util/efirom
46: ICCFIX := ./util/iccfix
47: EINFO := ./util/einfo
48: GENKEYMAP := ./util/genkeymap.pl
49: DOXYGEN := doxygen
50: BINUTILS_DIR := /usr
51: BFD_DIR := $(BINUTILS_DIR)
52: ZLIB_DIR := /usr
53:
54: ###############################################################################
55: #
56: # SRCDIRS lists all directories containing source files.
57: #
58: SRCDIRS :=
59: SRCDIRS += libgcc
60: SRCDIRS += core
61: SRCDIRS += net net/tcp net/udp net/infiniband net/80211
62: SRCDIRS += image
63: SRCDIRS += drivers/bus
64: SRCDIRS += drivers/net
65: SRCDIRS += drivers/net/e1000
66: SRCDIRS += drivers/net/e1000e
67: SRCDIRS += drivers/net/igb
68: SRCDIRS += drivers/net/igbvf
69: SRCDIRS += drivers/net/phantom
70: SRCDIRS += drivers/net/rtl818x
71: SRCDIRS += drivers/net/ath5k
72: SRCDIRS += drivers/net/vxge
73: SRCDIRS += drivers/net/efi
74: SRCDIRS += drivers/block
75: SRCDIRS += drivers/nvs
76: SRCDIRS += drivers/bitbash
77: SRCDIRS += drivers/infiniband
78: SRCDIRS += interface/pxe interface/efi interface/smbios
79: SRCDIRS += interface/bofm
80: SRCDIRS += tests
81: SRCDIRS += crypto crypto/axtls crypto/matrixssl
82: SRCDIRS += hci hci/commands hci/tui
83: SRCDIRS += hci/mucurses hci/mucurses/widgets
84: SRCDIRS += hci/keymap
85: SRCDIRS += usr
86: SRCDIRS += config
87:
88: # NON_AUTO_SRCS lists files that are excluded from the normal
89: # automatic build system.
90: #
91: NON_AUTO_SRCS :=
92: NON_AUTO_SRCS += drivers/net/prism2.c
93:
94: # INCDIRS lists the include path
95: #
96: INCDIRS :=
97: INCDIRS += include .
98:
99: ###############################################################################
100: #
101: # Default build target: build the most common targets and print out a
102: # helpfully suggestive message
103: #
104: ALL := bin/blib.a bin/ipxe.dsk bin/ipxe.lkrn bin/ipxe.iso \
105: bin/ipxe.usb bin/undionly.kpxe bin/rtl8139.rom
106: all : $(ALL)
107: @$(ECHO) '==========================================================='
108: @$(ECHO)
109: @$(ECHO) 'To create a bootable floppy, type'
110: @$(ECHO) ' cat bin/ipxe.dsk > /dev/fd0'
111: @$(ECHO) 'where /dev/fd0 is your floppy drive. This will erase any'
112: @$(ECHO) 'data already on the disk.'
113: @$(ECHO)
114: @$(ECHO) 'To create a bootable USB key, type'
115: @$(ECHO) ' cat bin/ipxe.usb > /dev/sdX'
116: @$(ECHO) 'where /dev/sdX is your USB key, and is *not* a real hard'
117: @$(ECHO) 'disk on your system. This will erase any data already on'
118: @$(ECHO) 'the USB key.'
119: @$(ECHO)
120: @$(ECHO) 'To create a bootable CD-ROM, burn the ISO image '
121: @$(ECHO) 'bin/ipxe.iso to a blank CD-ROM.'
122: @$(ECHO)
123: @$(ECHO) 'These images contain drivers for all supported cards. You'
124: @$(ECHO) 'can build more customised images, and ROM images, using'
125: @$(ECHO) ' make bin/<rom-name>.<output-format>'
126: @$(ECHO)
127: @$(ECHO) '==========================================================='
128:
129: ###############################################################################
130: #
131: # Comprehensive build target: build a selection of cross-platform
132: # targets to expose potential build errors that show up only on
133: # certain platforms
134: #
135: everything :
136: $(Q)$(MAKE) --no-print-directory $(ALL) \
137: bin-i386-efi/ipxe.efi bin-i386-efi/ipxe.efidrv \
138: bin-i386-efi/ipxe.efirom \
139: bin-x86_64-efi/ipxe.efi bin-x86_64-efi/ipxe.efidrv \
140: bin-x86_64-efi/ipxe.efirom \
141: bin-i386-linux/tap.linux bin-x86_64-linux/tap.linux
142:
143: ###############################################################################
144: #
145: # Build targets that do nothing but might be tried by users
146: #
147: configure :
148: @$(ECHO) "No configuration needed."
149:
150: install :
151: @$(ECHO) "No installation required."
152:
153: ###############################################################################
154: #
155: # Version number calculations
156: #
157: VERSION_MAJOR = 1
158: VERSION_MINOR = 0
159: VERSION_PATCH = 0
160: EXTRAVERSION = +
161: MM_VERSION = $(VERSION_MAJOR).$(VERSION_MINOR)
162: VERSION = $(MM_VERSION).$(VERSION_PATCH)$(EXTRAVERSION)
163: CFLAGS += -DVERSION_MAJOR=$(VERSION_MAJOR) \
164: -DVERSION_MINOR=$(VERSION_MINOR) \
165: -DVERSION_PATCH=$(VERSION_PATCH) \
166: -DVERSION=\"$(VERSION)\"
167: IDENT = '$(@F) $(VERSION) (GPL) ipxe.org'
168: version :
169: @$(ECHO) $(VERSION)
170:
171: ###############################################################################
172: #
173: # Drag in the bulk of the build system
174: #
175:
176: MAKEDEPS += Makefile.housekeeping
177: include Makefile.housekeeping
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.