aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Makefile
diff options
context:
space:
mode:
authorDavid M. Syzdek <david@syzdek.net>2018-01-27 14:50:21 -0900
committerDavid M. Syzdek <david@syzdek.net>2018-01-27 14:50:21 -0900
commit42d2385060f8c052d640b555e8fc3156415d5057 (patch)
treee04deec1f6e36cc2d66c7fc51e047e34c9374c2e /Makefile
parent5160cb15d246c29f14dc25dd40219b9e71e96bdc (diff)
downloadiperd-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--Makefile98
1 files changed, 1 insertions, 97 deletions
diff --git a/Makefile b/Makefile
index 1757c33..d5c2630 100644
--- a/Makefile
+++ b/Makefile
@@ -39,11 +39,6 @@ SCRIPTDIR = src/scripts
39SYSLINDIR = src/syslinux 39SYSLINDIR = src/syslinux
40 40
41 41
42SYSLINUX_VERSION ?= 6.04-pre1
43#MIRROR_SYSLINUX ?= https://www.kernel.org/pub/linux/utils/boot/syslinux/6.xx/syslinux-$(SYSLINUX_VERSION).tar.xz
44MIRROR_SYSLINUX ?= https://www.kernel.org/pub/linux/utils/boot/syslinux/Testing/6.04/syslinux-6.04-pre1.tar.xz
45
46
47IPERD_VERSION = $(shell git describe --long --abbrev=7 HEAD |sed -e 's/\-/./g' -e 's/^v//g') 42IPERD_VERSION = $(shell git describe --long --abbrev=7 HEAD |sed -e 's/\-/./g' -e 's/^v//g')
48DATE = $(shell date +%Y-%m-%d) 43DATE = $(shell date +%Y-%m-%d)
49 44
@@ -156,6 +151,7 @@ NETBOOT_TFTP_PATH ?= /
156NETBOOT_TFTP ?= tftp://$(NETBOOT_TFTP_HOST)$(NETBOOT_TFTP_PATH) 151NETBOOT_TFTP ?= tftp://$(NETBOOT_TFTP_HOST)$(NETBOOT_TFTP_PATH)
157NETBOOT ?= $(NETBOOT_HTTP) 152NETBOOT ?= $(NETBOOT_HTTP)
158-include Makefile.config 153-include Makefile.config
154include src/syslinux/Makefile.syslinux
159 155
160 156
161images/iperdboot.gpt.img: $(PREREQ_CNF) $(DOWNLOAD_FILES) $(SCRIPTDIR)/diskimage.sh $(SCRIPTDIR)/thumbdrive.sh 157images/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
182syslinux/isolinux.bin.mod: $(PREREQ_CNF)
183 cp syslinux/isolinux.bin "$(@)"
184 @touch "$(@)"
185
186
187images/iperdboot.iso: $(DOWNLOAD_FILES) syslinux/isolinux.bin.mod 178images/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)
212images: images/iperdboot.$(DISKTYPE).img images/iperdboot.iso 203images: images/iperdboot.$(DISKTYPE).img images/iperdboot.iso
213 204
214 205
215tmp/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
223syslinux/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
242EFI/BOOT/syslia32.cfg: src/syslinux/syslia32.cfg
243 @mkdir -p $$(dirname $(@))
244 cp src/syslinux/syslia32.cfg $(@)
245 @touch $(@)
246
247
248EFI/BOOT/syslx64.cfg: src/syslinux/syslx64.cfg
249 @mkdir -p $$(dirname $(@))
250 cp src/syslinux/syslx64.cfg $(@)
251 @touch $(@)
252
253
254EFI/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
260EFI/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
266EFI/BOOT/ldlinux.e32 ldlinux.e32: syslinux/iperd.dep
267 @mkdir -p $$(dirname $(@))
268 cp syslinux/efi32/ldlinux.e32 $(@)
269 @touch $(@)
270
271
272EFI/BOOT/ldlinux.e64 ldlinux.e64: syslinux/iperd.dep
273 @mkdir -p $$(dirname $(@))
274 cp syslinux/efi64/ldlinux.e64 $(@)
275 @touch $(@)
276
277
278syslinux/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
286syslinux/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
294syslinux/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
302syslinux: $(PREREQ_CNF) 206syslinux: $(PREREQ_CNF)
303 207
304 208