[e16e8f2] | 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. |
---|
| 14 | ## |
---|
| 15 | ## ----------------------------------------------------------------------- |
---|
| 16 | |
---|
| 17 | # |
---|
| 18 | # Makefile for the SYSLINUX geometry display for diagnostics |
---|
| 19 | # |
---|
| 20 | |
---|
| 21 | include $(MAKEDIR)/embedded.mk |
---|
| 22 | coredir = $(topdir)/core |
---|
| 23 | VPATH = $(SRC) |
---|
| 24 | |
---|
| 25 | BTARGET = geodsp1s.bin geodspms.bin \ |
---|
| 26 | geodsp1s.img.xz geodspms.img.xz |
---|
| 27 | |
---|
| 28 | NASMOPT = -i $(coredir)/ -i $(SRC)/ -Ox -f bin -dBINFMT |
---|
| 29 | NASMOPT += -w+orphan-labels |
---|
| 30 | CFLAGS = -g -O |
---|
| 31 | |
---|
| 32 | all: $(BTARGET) |
---|
| 33 | |
---|
| 34 | # Higher compression levels result in larger files |
---|
| 35 | %.img.xz: %.bin mk-lba-img.pl |
---|
| 36 | $(PERL) $(SRC)/mk-lba-img.pl $< | $(XZ) -0 > $@ || ( rm -f $@ ; false ) |
---|
| 37 | |
---|
| 38 | %.img.gz: %.bin mk-lba-img.pl |
---|
| 39 | $(PERL) $(SRC)/mk-lba-img.pl $< | $(GZIPPROG) -9 > $@ || ( rm -f $@ ; false ) |
---|
| 40 | |
---|
| 41 | # in case someone really wants these without needing a decompressor |
---|
| 42 | %.img: %.bin mk-lba-img.pl |
---|
| 43 | $(PERL) $(SRC)/mk-lba-img.pl $< > $@ || ( rm -f $@ ; false ) |
---|
| 44 | |
---|
| 45 | %.bin: %.asm $(coredir)/writehex.inc $(coredir)/macros.inc $(coredir)/diskboot.inc |
---|
| 46 | $(NASM) $(NASMOPT) -o $@ -l $(@:.bin=.lst) $< |
---|
| 47 | |
---|
| 48 | mk-lba-img: mk-lba-img.c |
---|
| 49 | $(CC) $(CFLAGS) -o $@ $< |
---|
| 50 | |
---|
| 51 | tidy dist: |
---|
| 52 | rm -Rf *.lst *.img |
---|
| 53 | rm -f mk-lba-img |
---|
| 54 | |
---|
| 55 | clean: tidy |
---|
| 56 | |
---|
| 57 | spotless: clean |
---|
| 58 | rm -f $(BTARGET) |
---|