# Makefile for the iodev component of bochs


#This file is part of the IODEV (Input Output DEVices) component of BOCHS.
#
#The IODEV component 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, or (at your option)
#any later version.
#
#The IODEV component 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 the IODEV component; see the file COPYING.  If not, write to
#the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.





# Solaris 2.3 on SPARC w/ SunPRO C
#BX_CC       = cc
#BX_CFLAGS   = -g -Xt

# SunOS 4.1.3 on SPARC w/ SunPRO C
#BX_CC       = acc
#BX_CLAGS    = -g

# Linux .99p15 on i486 w/ gcc
BX_CC       = gcc
BX_CFLAGS   = -g -ansi


#
# -------- end configurable options --------------------------
#

BX_EXE      = iodev
BX_OBJS     = main.o \
              register_handlers.o \
              iodev_pic.o \
              iodev_pit.o \
              iodev_unmapped.o \
              iodev_cmos.o \
              iodev_dma.o \
              iodev_floppy.o \
              iodev_harddrv.o \
              iodev_keyboard.o \
              iodev_parallel.o \
              iodev_serial.o \
              iodev_vga.o \
              bios_post.o

BX_INCLUDES = iodev.h

.c.o:
	$(BX_CC) -c $(BX_CFLAGS) $<



$(BX_EXE): $(BX_OBJS)
	$(BX_CC) -o $@ $(BX_CFLAGS) $(BX_OBJS)

$(BX_OBJS): $(BX_INCLUDES)


backups:
	tar cvf io`date "+%m%d%H"`.tar *.c *.h *.doc Makefile
	-mmd b:/bochs
	-mmd b:/bochs/io`date "+%m%d%H"`
	mcopy io`date "+%m%d%H"`.tar b:/bochs/io`date "+%m%d%H"`
	mdir b:/bochs/io`date "+%m%d%H"`

clean:
	rm -f *~ *.o \#*\# $(BX_EXE)

