#
# Makefile  -  makefile for net boot loader routines
#
# Copyright (C) 1995-2003 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.4 2003/01/25 23:29:41 gkminix Exp $
#


#
#  Include user configuration:
#
include ../make.config


#
# Name of module this subdirectory is part of
#
MODULE		= loader


#
#  List of source and object files:
#
CSRCS		= 
ASRCS		= floppy.S rom.S inflate.S segend.S
TARGETS		= rom.bin floppy.bin


#
#  Flags for compiling the sources
#
FLAGS		= $(LODFL)


#
#  Include system dependent definitions:
#
include ../make.defs


#
#  Target rules.
#
all:		$(TARGETS)


rom.bin:	$(OBJS)
	$(LD86) $(LD86FLAGS) -o $@ rom.o inflate.o segend.o
	@chmod 0644 $@
	@cp $@ $(bindestdir)/rom.bin
	$(LD86) $(LD86FLAGS) -o $(@:%.bin=%86.bin) rom.o16 inflate.o16 segend.o16
	@chmod 0644 $(@:%.bin=%86.bin)
	@cp $(@:%.bin=%86.bin) $(bindestdir)/rom86.bin


floppy.bin:	$(OBJS) rom.bin
	$(LD86) $(LD86FLAGS) -o $@ floppy.o
	@chmod 0644 $@
	@cat $@ rom.bin >$(bindestdir)/floppy.bin
	@cat $@ rom86.bin >$(bindestdir)/floppy86.bin


#
# Maintenance rules
#
.PHONY:	dep install clean distclean realclean

dep:	dep-defs


install:


clean:	clean-defs
	rm -f $(TARGETS) $(TARGETS:%.bin=%86.bin)

distclean realclean:	realclean-defs
	rm -f $(TARGETS) $(TARGETS:%.bin=%86.bin)


### Dependencies


syntax highlighted by Code2HTML, v. 0.9.1