#
#   $Id: Makefile,v 1.2 1999/01/19 18:21:47 peter Exp $
#   Copyright (c) 1998 by the Free Pascal Development Team
#
#   Makefile for Free Vision for Free Pascal
#
#   See the file COPYING.FPC, included in this distribution,
#   for details about the copyright.
#
#   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.
#

#####################################################################
# Defaults
#####################################################################

# We need this directory as first
NEEDUNITDIR=.

# Where need we to place the executables/ppu/objects
TARGETDIR=.

# As default make only the units
DEFAULTUNITS=1


#####################################################################
# Real targets
#####################################################################

# Override defaults
override LIBNAME=fv
override PASEXT=.pas

vpath %$(PASEXT) base dialogs app test

include base/makefile.fv
include dialogs/makefile.fv
include app/makefile.fv
include test/makefile.fv

UNITOBJECTS=$(BASEOBJECTS) $(DIALOGOBJECTS) $(APPOBJECTS)
EXEOBJECTS=$(TESTOBJECTS)


#####################################################################
# Include default makefile
#####################################################################

ifndef FPCMAKE
ifdef FPCDIR
FPCMAKE=$(FPCDIR)/makefile.fpc
else
FPCMAKE=makefile.fpc
endif
endif

override FPCMAKE:=$(strip $(wildcard $(FPCMAKE)))
ifeq ($(FPCMAKE),)
nofpcmake:
	@echo
	@echo makefile.fpc not found!
	@echo Check the FPCMAKE and FPCDIR environment variables.
	@echo
	@exit
else
include $(FPCMAKE)
endif


#####################################################################
# Dependencies
#####################################################################

include depend

# Allow test as target which compiles the exes
test: exes

#
# $Log: Makefile,v $
# Revision 1.2  1999/01/19 18:21:47  peter
#   * Use FPCDIR and FPCMAKE environment to find makefile.fpc
#   * better install dir setting
#
# Revision 1.1	1998/12/22 15:10:47  peter
#   * moved
#
# Revision 1.2	1998/12/12 19:15:30  peter
#   * make all only makes the units, use make test for the test programs
#
# Revision 1.1	1998/10/27 14:23:58  peter
#   + makefiles
#
#
