#
# Makefile  -  makefile for MGL loaders
#
# Copyright (C) 2003-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.7 2007/01/06 18:31:37 gkminix Exp $
#


# Directory name of this module
MODNAME = mknbi-mgl


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


# Source files for the target system. Note that exports.o86 has to come last!
SSRCS86    = first-dos.S86 first-nb.S86 first-pxe.S86 osload.S86 loadbin.S86
CSRCS86    = 
OBJS       = $(SSRCS86:%.S86=%.o86) $(CSRCS86:%.c86=%.o86)
TARGET     = first-dos.exe first-nb.b86 first-pxe.b86


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



# Generate the final target binaries
.PHONY:		first-gnu first-nognu

first-gnu:	$(TARGET)

first-nognu:


# Generate the DOS loader
first-dos.exe:	first-dos.o86


# Generate the netboot loader
first-nb.b86:	first-nb.o86 loadbin.o86


# Generate the netboot loader
first-pxe.b86:	first-pxe.o86 loadbin.o86


# Generate the boot image loader
osload.b86:	osload.o86

loadbin.o86:	loadbin.S86 osload.b86


# General rules
clean:		clean-general
		rm -f osload.b86

distclean:	clean

realclean:	distclean

