diff options
| author | David M. Syzdek <david@syzdek.net> | 2018-01-27 14:50:21 -0900 |
|---|---|---|
| committer | David M. Syzdek <david@syzdek.net> | 2018-01-27 14:50:21 -0900 |
| commit | 42d2385060f8c052d640b555e8fc3156415d5057 (patch) | |
| tree | e04deec1f6e36cc2d66c7fc51e047e34c9374c2e /Makefile | |
| parent | 5160cb15d246c29f14dc25dd40219b9e71e96bdc (diff) | |
| download | iperd-42d2385060f8c052d640b555e8fc3156415d5057.tar.gz iperd-42d2385060f8c052d640b555e8fc3156415d5057.tar.bz2 iperd-42d2385060f8c052d640b555e8fc3156415d5057.tar.xz iperd-42d2385060f8c052d640b555e8fc3156415d5057.zip | |
Makefile: moving syslinux specific targets to Makefile.syslinux
Moving syslinux specific targets and variables to an include file in order to
declutter the main Makefile.
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 98 |
1 files changed, 1 insertions, 97 deletions
| @@ -39,11 +39,6 @@ SCRIPTDIR = src/scripts | |||
| 39 | SYSLINDIR = src/syslinux | 39 | SYSLINDIR = src/syslinux |
| 40 | 40 | ||
| 41 | 41 | ||
| 42 | SYSLINUX_VERSION ?= 6.04-pre1 | ||
| 43 | #MIRROR_SYSLINUX ?= https://www.kernel.org/pub/linux/utils/boot/syslinux/6.xx/syslinux-$(SYSLINUX_VERSION).tar.xz | ||
| 44 | MIRROR_SYSLINUX ?= https://www.kernel.org/pub/linux/utils/boot/syslinux/Testing/6.04/syslinux-6.04-pre1.tar.xz | ||
| 45 | |||
| 46 | |||
| 47 | IPERD_VERSION = $(shell git describe --long --abbrev=7 HEAD |sed -e 's/\-/./g' -e 's/^v//g') | 42 | IPERD_VERSION = $(shell git describe --long --abbrev=7 HEAD |sed -e 's/\-/./g' -e 's/^v//g') |
| 48 | DATE = $(shell date +%Y-%m-%d) | 43 | DATE = $(shell date +%Y-%m-%d) |
| 49 | 44 | ||
| @@ -156,6 +151,7 @@ NETBOOT_TFTP_PATH ?= / | |||
| 156 | NETBOOT_TFTP ?= tftp://$(NETBOOT_TFTP_HOST)$(NETBOOT_TFTP_PATH) | 151 | NETBOOT_TFTP ?= tftp://$(NETBOOT_TFTP_HOST)$(NETBOOT_TFTP_PATH) |
| 157 | NETBOOT ?= $(NETBOOT_HTTP) | 152 | NETBOOT ?= $(NETBOOT_HTTP) |
| 158 | -include Makefile.config | 153 | -include Makefile.config |
| 154 | include src/syslinux/Makefile.syslinux | ||
| 159 | 155 | ||
| 160 | 156 | ||
| 161 | images/iperdboot.gpt.img: $(PREREQ_CNF) $(DOWNLOAD_FILES) $(SCRIPTDIR)/diskimage.sh $(SCRIPTDIR)/thumbdrive.sh | 157 | images/iperdboot.gpt.img: $(PREREQ_CNF) $(DOWNLOAD_FILES) $(SCRIPTDIR)/diskimage.sh $(SCRIPTDIR)/thumbdrive.sh |
| @@ -179,11 +175,6 @@ images/iperdboot.mbr.img: $(PREREQ_CNF) $(DOWNLOAD_FILES) $(SCRIPTDIR)/diskimage | |||
| 179 | @touch "$(@)" | 175 | @touch "$(@)" |
| 180 | 176 | ||
| 181 | 177 | ||
| 182 | syslinux/isolinux.bin.mod: $(PREREQ_CNF) | ||
| 183 | cp syslinux/isolinux.bin "$(@)" | ||
| 184 | @touch "$(@)" | ||
| 185 | |||
| 186 | |||
| 187 | images/iperdboot.iso: $(DOWNLOAD_FILES) syslinux/isolinux.bin.mod | 178 | images/iperdboot.iso: $(DOWNLOAD_FILES) syslinux/isolinux.bin.mod |
| 188 | @mkdir -p $$(dirname "$(@)") | 179 | @mkdir -p $$(dirname "$(@)") |
| 189 | @rm -f "$(@)" | 180 | @rm -f "$(@)" |
| @@ -212,93 +203,6 @@ thumbdrive: $(PREREQ_CNF) $(DOWNLOAD_FILES) | |||
| 212 | images: images/iperdboot.$(DISKTYPE).img images/iperdboot.iso | 203 | images: images/iperdboot.$(DISKTYPE).img images/iperdboot.iso |
| 213 | 204 | ||
| 214 | 205 | ||
| 215 | tmp/src/syslinux-$(SYSLINUX_VERSION)/.iperd-extracted: | ||
| 216 | ./src/scripts/download.sh \ | ||
| 217 | tmp/src/syslinux-$(SYSLINUX_VERSION).tar.xz \ | ||
| 218 | $(MIRROR_SYSLINUX) | ||
| 219 | cd tmp/src && tar -xf syslinux-$(SYSLINUX_VERSION).tar.xz | ||
| 220 | touch $(@) | ||
| 221 | |||
| 222 | |||
| 223 | syslinux/iperd.dep: tmp/src/syslinux-$(SYSLINUX_VERSION)/.iperd-extracted | ||
| 224 | rm -Rf syslinux | ||
| 225 | rm -Rf EFI | ||
| 226 | cd tmp/src/syslinux-$(SYSLINUX_VERSION); \ | ||
| 227 | make -s install INSTALLROOT="$(PWD)/tmp/syslinux" \ | ||
| 228 | || { rm -Rf tmp/src/syslinux-$(SYSLINUX_VERSION); exit 1; } | ||
| 229 | rsync -ra "$(PWD)/tmp/syslinux/usr/share/syslinux/" syslinux | ||
| 230 | rsync -ra "$(PWD)/tmp/syslinux/usr/bin/" syslinux/bin | ||
| 231 | rsync -ra "$(PWD)/tmp/syslinux/sbin/" syslinux/sbin | ||
| 232 | cp $(SYSLINDIR)/f1.txt syslinux/ | ||
| 233 | cp $(SYSLINDIR)/f2.txt syslinux/ | ||
| 234 | cp $(SYSLINDIR)/lpxelinux.cfg syslinux/ | ||
| 235 | cp $(SYSLINDIR)/efi32/pxelinux.cfg syslinux/efi32/ | ||
| 236 | cp $(SYSLINDIR)/efi64/pxelinux.cfg syslinux/efi64/ | ||
| 237 | cp /usr/share/hwdata/pci.ids syslinux/ | ||
| 238 | cp /lib/modules/$$(uname -r)/modules.alias syslinux/modules.als | ||
| 239 | @touch "$(@)" | ||
| 240 | |||
| 241 | |||
| 242 | EFI/BOOT/syslia32.cfg: src/syslinux/syslia32.cfg | ||
| 243 | @mkdir -p $$(dirname $(@)) | ||
| 244 | cp src/syslinux/syslia32.cfg $(@) | ||
| 245 | @touch $(@) | ||
| 246 | |||
| 247 | |||
| 248 | EFI/BOOT/syslx64.cfg: src/syslinux/syslx64.cfg | ||
| 249 | @mkdir -p $$(dirname $(@)) | ||
| 250 | cp src/syslinux/syslx64.cfg $(@) | ||
| 251 | @touch $(@) | ||
| 252 | |||
| 253 | |||
| 254 | EFI/BOOT/BOOTX64.EFI EFI/BOOT/BOOTX64.EFI.0: syslinux/iperd.dep | ||
| 255 | @mkdir -p $$(dirname $(@)) | ||
| 256 | cp syslinux/efi64/syslinux.efi $(@) | ||
| 257 | @touch $(@) | ||
| 258 | |||
| 259 | |||
| 260 | EFI/BOOT/BOOTIA32.EFI EFI/BOOT/BOOTIA32.EFI.0: syslinux/iperd.dep | ||
| 261 | @mkdir -p $$(dirname $(@)) | ||
| 262 | cp syslinux/efi32/syslinux.efi $(@) | ||
| 263 | @touch $(@) | ||
| 264 | |||
| 265 | |||
| 266 | EFI/BOOT/ldlinux.e32 ldlinux.e32: syslinux/iperd.dep | ||
| 267 | @mkdir -p $$(dirname $(@)) | ||
| 268 | cp syslinux/efi32/ldlinux.e32 $(@) | ||
| 269 | @touch $(@) | ||
| 270 | |||
| 271 | |||
| 272 | EFI/BOOT/ldlinux.e64 ldlinux.e64: syslinux/iperd.dep | ||
| 273 | @mkdir -p $$(dirname $(@)) | ||
| 274 | cp syslinux/efi64/ldlinux.e64 $(@) | ||
| 275 | @touch $(@) | ||
| 276 | |||
| 277 | |||
| 278 | syslinux/isolinux.cfg: Makefile.config $(ISOLINUX_CFG) $(PREREQ_BIN) $(SYSLINDIR)/common.cfg | ||
| 279 | @rm -f "$(@)" | ||
| 280 | @mkdir -p "$$(dirname "$(@)")" | ||
| 281 | @echo 'do_subst $$(SYSLINDIR)/common.cfg $$(ISOLINUX_CFG) > $(@)' | ||
| 282 | @$(do_subst) $(SYSLINDIR)/common.cfg $(ISOLINUX_CFG) > "$(@)" | ||
| 283 | @touch "$(@)" | ||
| 284 | |||
| 285 | |||
| 286 | syslinux/pxelinux.cfg: Makefile.config $(PXELINUX_CFG) $(PREREQ_BIN) $(SYSLINDIR)/common.cfg | ||
| 287 | @rm -f "$(@)" | ||
| 288 | @mkdir -p "$$(dirname "$(@)")" | ||
| 289 | @echo 'do_subst $$(SYSLINDIR)/common.cfg $$(PXELINUX_CFG) > $(@)' | ||
| 290 | @$(do_subst) $(SYSLINDIR)/common.cfg $(PXELINUX_CFG) > "$(@)" | ||
| 291 | @touch "$(@)" | ||
| 292 | |||
| 293 | |||
| 294 | syslinux/syslinux.cfg: Makefile.config $(SYSLINUX_CFG) $(PREREQ_BIN) $(SYSLINDIR)/common.cfg | ||
| 295 | @rm -f "$(@)" | ||
| 296 | @mkdir -p syslinux | ||
| 297 | @echo 'do_subst $$(SYSLINDIR)/common.cfg $$(SYSLINUX_CFG) > $(@)' | ||
| 298 | @$(do_subst) $(SYSLINDIR)/common.cfg $(SYSLINUX_CFG) > "$(@)" | ||
| 299 | @touch "$(@)" | ||
| 300 | |||
| 301 | |||
| 302 | syslinux: $(PREREQ_CNF) | 206 | syslinux: $(PREREQ_CNF) |
| 303 | 207 | ||
| 304 | 208 | ||
