diag/geodsp: Display Geometry based on read
[syslinux.git] / diag / geodsp / Makefile
blobe2d710dc249407928f4a7c90c66db9313868ebd8
1 ## -----------------------------------------------------------------------
2 ##
3 ## Copyright 2010-2011 Gene Cumm
4 ##
5 ## Portions from core/Makefile:
6 ## Copyright 1998-2009 H. Peter Anvin - All Rights Reserved
7 ## Copyright 2009-2010 Intel Corporation; author: H. Peter Anvin
8 ##
9 ## This program is free software; you can redistribute it and/or modify
10 ## it under the terms of the GNU General Public License as published by
11 ## the Free Software Foundation, Inc., 53 Temple Place Ste 330,
12 ## Boston MA 02111-1307, USA; either version 2 of the License, or
13 ## (at your option) any later version; incorporated herein by reference.
15 ## -----------------------------------------------------------------------
18 # Makefile for the SYSLINUX geometry display for diagnostics
21 topdir = ../..
22 # include $(topdir)/MCONFIG.embedded
23 coredir = $(topdir)/core
25 BTARGET = geodsp1s.bin geodspms.bin mk-lba-img \
26 geodsp1s.img.xz geodspms.img.xz
27 # lba-1s.img.xz lba-ms.img.xz
28 # lba-1s.img lba-ms.img
30 NASMOPT = -i $(coredir)/ -Ox -f bin
31 NASMOPT += -w+orphan-labels
33 all: $(BTARGET)
35 .PRECIOUS: %.img
36 # .PRECIOUS: lba-%.img
38 # Higher compression levels result in larger files
39 %.img.xz: %.img
40 xz -k0f $<
42 %.img.gz: %.img
43 gzip -9c $< > $@
45 %.img: %.bin lba.img
46 (cp -a lba.img $@ && dd conv=notrunc if=$< of=$@) || rm -f $@
48 %.bin: %.asm $(coredir)/writehex.inc $(coredir)/macros.inc $(coredir)/diskboot.inc
49 nasm $(NASMOPT) -o $@ -l $(@:.bin=.lst) $<
51 mk-lba-img: mk-lba-img.c
52 gcc -o $@ $<
54 lba.img: mk-lba-img
55 $< $@
57 tidy dist:
58 rm -Rf *.img
60 clean: tidy
61 rm -f $(BTARGET) *.lst *.bin *_bin.c
63 spotless: clean