# Generated automatically from Makefile.in by configure.
#  plex86: run multiple x86 operating systems concurrently
#  Copyright (C) 1999-2000  The plex86 developers team
#
#  This library is free software; you can redistribute it and/or
#  modify it under the terms of the GNU Lesser General Public
#  License as published by the Free Software Foundation; either
#  version 2 of the License, or (at your option) any later version.
#
#  This library 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
#  Lesser General Public License for more details.
#
#  You should have received a copy of the GNU Lesser General Public
#  License along with this library; if not, write to the Free Software
#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

SHELL = /bin/sh



CC       = gcc
CFLAGS   = -g -O2 -Wall -Wstrict-prototypes
LDFLAGS  = 
CXX      = c++
CXXFLAGS = -g -O2 -Wall -Wstrict-prototypes

srcdir	= .

X_LIBS =  -L/usr/X11R6/lib
X_PRE_LIBS =  -lSM -lICE
GUI_LINK_OPTS_X = $(X_LIBS) $(X_PRE_LIBS) -lX11
GUI_LINK_OPTS_BEOS = -lbe
GUI_LINK_OPTS_WIN32 = -luser32 -lgdi32 -lwinmm -lcomdlg32 -lcomctl32
GUI_LINK_OPTS_WIN32_VCPP = user32.lib gdi32.lib winmm.lib \
  comdlg32.lib comctl32.lib wsock32.lib
GUI_LINK_OPTS_NOGUI =
GUI_LINK_OPTS_SDL = `sdl-config --libs`
GUI_LINK_OPTS = $(GUI_LINK_OPTS_X)


BOCHSDIR = /home/kevin/bochs/bochs-2000_0325a
BOCHSLIBS = \
  $(BOCHSDIR)/main.o \
  $(BOCHSDIR)/load32bitOShack.o \
  $(BOCHSDIR)/state_file.o \
  $(BOCHSDIR)/pc_system.o \
  $(BOCHSDIR)/iodev/libiodev.a \
  $(BOCHSDIR)/cpu/libcpu.a \
  $(BOCHSDIR)/memory/libmemory.a \
  $(BOCHSDIR)/gui/libgui.a \
  $(BOCHSDIR)/debug/libdebug.a \
  $(BOCHSDIR)/disasm/libdisasm.a \
  $(BOCHSDIR)/fpu/libfpu.a \
  -L/usr/X11R6/lib -R/usr/X11R6/lib -lSM -lICE -lX11

COSIM_EXTERNAL_LIBS = 
COSIM_O = 


ALL: plex86 resetmod
	$(MAKE) -C plugins $(MDEFINES)

.c.o:
	$(CC) -I$(srcdir)/.. -I$(srcdir) $(CFLAGS) -c  $<

plex86: plex86.o user.o decode.o plugin.o $(COSIM_O) gui/libgui.a
	$(CXX) -o plex86 plex86.o user.o decode.o plugin.o $(COSIM_O) \
	  gui/libgui.a -ldl -rdynamic $(COSIM_EXTERNAL_LIBS) \
	  $(GUI_LINK_OPTS_X)

gui/libgui.a:
	cd gui && \
	$(MAKE) $(MDEFINES) libgui.a
	echo done

resetmod: resetmod.o
	$(CC) -o resetmod resetmod.o

clean:
	$(MAKE) -C plugins clean
	$(MAKE) -C gui clean
	/bin/rm -f *.o plex86 resetmod core bochs.out

dist-clean: clean
	$(MAKE) -C plugins dist-clean
	$(MAKE) -C gui dist-clean
	/bin/rm -f Makefile

Makefile:	Makefile.in ../config.status
		cd ..; CONFIG_FILES=user/Makefile CONFIG_HEADERS= $(SHELL) config.status
