#
# Makefile  -  makefile for netboot bootrom loader routines
#
# Copyright (C) 1995-2007 Gero Kuhlmann <gero@gkminix.han.de>
#
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# $Id: Makefile,v 1.13 2007/01/06 18:30:47 gkminix Exp $
#


# Directory name of this module and special defines
MODNAME = bootrom/loader
MODDEFS = _LOADER_


# Include makefile configuration
include ../../make.config
include ../../make.rules


# Source files for the target system
SSRCS86 = floppy.S86 rom.S86 inflate.S86


# Target files in this directory
TARGET = floppy.bin rom.bin


# Rules to generate the target system files
all:		floppy-$(GNU16BIT) rom-$(GNU16BIT)


# Generate the floppy boot sector
.PHONY:		floppy-gnu floppy-nognu floppy-inst

floppy-gnu:	floppy-inst

floppy-nognu:

floppy-inst:	floppy.bin
		@$(CPATTR) $< $(bindestdir)/$<

floppy.bin:	floppy.boot rom.bin
		@cat $^ >$@

floppy.boot:	floppy.o86


# Generate the bootrom loader
.PHONY:		rom-gnu rom-nognu rom-inst

rom-gnu:	rom-inst

rom-nognu:

rom-inst:	rom.bin
		@$(CPATTR) $< $(bindestdir)/$<

rom.bin:	rom.o86 inflate.o86


# Generate all files necessary for distribution
distrib:	rom-inst floppy-inst


# Clean up
clean:		clean-general
		rm -f *.s86 floppy.boot

distclean:	clean

realclean:	clean

