[release] Update version to 1.0.1+ post release
[gpxe.git] / src / Makefile
blobd71c59abba8072a60fd5c6dd39fa99264af8c67d
1 ###############################################################################
3 # Initialise various variables
6 CLEANUP :=
7 CFLAGS :=
8 ASFLAGS :=
9 LDFLAGS :=
10 MAKEDEPS := Makefile
12 ###############################################################################
14 # Locations of tools
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 := /usr/bin/perl
24 CC := $(CROSS_COMPILE)gcc
25 CPP := $(CC) -E
26 AS := $(CROSS_COMPILE)as
27 LD := $(CROSS_COMPILE)ld
28 SIZE := $(CROSS_COMPILE)size
29 AR := $(CROSS_COMPILE)ar
30 RANLIB := $(CROSS_COMPILE)ranlib
31 OBJCOPY := $(CROSS_COMPILE)objcopy
32 NM := $(CROSS_COMPILE)nm
33 OBJDUMP := $(CROSS_COMPILE)objdump
34 PARSEROM := $(PERL) ./util/parserom.pl
35 MAKEROM := $(PERL) ./util/makerom.pl
36 SYMCHECK := $(PERL) ./util/symcheck.pl
37 SORTOBJDUMP := $(PERL) ./util/sortobjdump.pl
38 PADIMG := $(PERL) ./util/padimg.pl
39 LICENCE := $(PERL) ./util/licence.pl
40 NRV2B := ./util/nrv2b
41 ZBIN := ./util/zbin
42 ELF2EFI32 := ./util/elf2efi32
43 ELF2EFI64 := ./util/elf2efi64
44 EFIROM := ./util/efirom
45 ICCFIX := ./util/iccfix
46 DOXYGEN := doxygen
47 BINUTILS_DIR := /usr
48 BFD_DIR := $(BINUTILS_DIR)
49 ZLIB_DIR := /usr
51 ###############################################################################
53 # SRCDIRS lists all directories containing source files.
55 SRCDIRS :=
56 SRCDIRS += libgcc
57 SRCDIRS += core
58 SRCDIRS += net net/tcp net/udp net/infiniband net/80211
59 SRCDIRS += image
60 SRCDIRS += drivers/bus
61 SRCDIRS += drivers/net
62 SRCDIRS += drivers/net/e1000
63 SRCDIRS += drivers/net/e1000e
64 SRCDIRS += drivers/net/igb
65 SRCDIRS += drivers/net/phantom
66 SRCDIRS += drivers/net/rtl818x
67 SRCDIRS += drivers/net/ath5k
68 SRCDIRS += drivers/net/vxge
69 SRCDIRS += drivers/net/efi
70 SRCDIRS += drivers/block
71 SRCDIRS += drivers/nvs
72 SRCDIRS += drivers/bitbash
73 SRCDIRS += drivers/infiniband
74 SRCDIRS += interface/pxe interface/efi interface/smbios
75 SRCDIRS += tests
76 SRCDIRS += crypto crypto/axtls crypto/matrixssl
77 SRCDIRS += hci hci/commands hci/tui
78 SRCDIRS += hci/mucurses hci/mucurses/widgets
79 SRCDIRS += usr
80 SRCDIRS += config
82 # NON_AUTO_SRCS lists files that are excluded from the normal
83 # automatic build system.
85 NON_AUTO_SRCS :=
86 NON_AUTO_SRCS += drivers/net/prism2.c
88 # INCDIRS lists the include path
90 INCDIRS :=
91 INCDIRS += include .
93 ###############################################################################
95 # Default build target: build the most common targets and print out a
96 # helpfully suggestive message
98 all : bin/blib.a bin/gpxe.dsk bin/gpxe.iso bin/gpxe.usb bin/undionly.kpxe
99 @$(ECHO) '==========================================================='
100 @$(ECHO)
101 @$(ECHO) 'To create a bootable floppy, type'
102 @$(ECHO) ' cat bin/gpxe.dsk > /dev/fd0'
103 @$(ECHO) 'where /dev/fd0 is your floppy drive. This will erase any'
104 @$(ECHO) 'data already on the disk.'
105 @$(ECHO)
106 @$(ECHO) 'To create a bootable USB key, type'
107 @$(ECHO) ' cat bin/gpxe.usb > /dev/sdX'
108 @$(ECHO) 'where /dev/sdX is your USB key, and is *not* a real hard'
109 @$(ECHO) 'disk on your system. This will erase any data already on'
110 @$(ECHO) 'the USB key.'
111 @$(ECHO)
112 @$(ECHO) 'To create a bootable CD-ROM, burn the ISO image '
113 @$(ECHO) 'bin/gpxe.iso to a blank CD-ROM.'
114 @$(ECHO)
115 @$(ECHO) 'These images contain drivers for all supported cards. You'
116 @$(ECHO) 'can build more customised images, and ROM images, using'
117 @$(ECHO) ' make bin/<rom-name>.<output-format>'
118 @$(ECHO)
119 @$(ECHO) '==========================================================='
121 ###############################################################################
123 # Build targets that do nothing but might be tried by users
125 configure :
126 @$(ECHO) "No configuration needed."
128 install :
129 @$(ECHO) "No installation required."
131 ###############################################################################
133 # Version number calculations
135 VERSION_MAJOR = 1
136 VERSION_MINOR = 0
137 VERSION_PATCH = 1
138 EXTRAVERSION = +
139 MM_VERSION = $(VERSION_MAJOR).$(VERSION_MINOR)
140 VERSION = $(MM_VERSION).$(VERSION_PATCH)$(EXTRAVERSION)
141 CFLAGS += -DVERSION_MAJOR=$(VERSION_MAJOR) \
142 -DVERSION_MINOR=$(VERSION_MINOR) \
143 -DVERSION_PATCH=$(VERSION_PATCH) \
144 -DVERSION=\"$(VERSION)\"
145 IDENT = '$(@F) $(VERSION) (GPL) etherboot.org'
146 version :
147 @$(ECHO) $(VERSION)
149 ###############################################################################
151 # Drag in the bulk of the build system
154 MAKEDEPS += Makefile.housekeeping
155 include Makefile.housekeeping