#
# Makefile  -  makefile for Linux boot loader
#
# 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:26 gkminix Exp $
#


# Directory name of this module
MODNAME = mknbi-linux


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



# Define the flags for compiling the boot loader with the
# debugging code enabled:
# ASM_DEBUG               -- enable debugging output while loading and
#                            initializing the kernel and ramdisk image.
# ASM_DEBUG_VERBOSE       -- enable even more debugging output.
# ASM_FREEZE_AFTER_INIT   -- freeze the system after successful initiali-
#                            zation; this is right before the actual kernel
#                            is launched. Enable this flag for debugging
#                            purposes only!
# ASM_KEYPRESS_AFTER_INIT -- freeze the system after successful initiali-
#                            zation and wait for the user to press a key
#                            before continuing.
#
ASM_DEBUG               = 1
ASM_DEBUG_VERBOSE       = 1
ASM_FREEZE_AFTER_INIT   = 0
ASM_KEYPRESS_AFTER_INIT = 1

GAS86DEBUG  = --defsym ASM_DEBUG=$(ASM_DEBUG) \
              --defsym ASM_DEBUG_VERBOSE=$(ASM_DEBUG_VERBOSE) \
              --defsym ASM_FREEZE_AFTER_INIT=$(ASM_FREEZE_AFTER_INIT) \
              --defsym ASM_KEYPRESS_AFTER_INIT=$(ASM_KEYPRESS_AFTER_INIT)


# Source files for the target system
SSRCS86 = first.S86


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


.PHONY:		first-gnu first-nognu

first-gnu:	first.b86

first-nognu:

first.b86:	first.o86


.PHONY:			first-debug-gnu first-debug-nognu

first-debug-gnu:	first-debug.b86

first-debug-nognu:

first-debug.b86:	first-debug.o86


# Cleanup
clean:		clean-general
		rm -f first.b86 first-debug.b86

distclean:	clean

realclean:	distclean


