#
# IBM Omni driver
# Copyright (c) International Business Machines Corp., 2000
#
# 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.1 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
#

# Stuff you change
DEBUG                   = 1
FOOMATICEXES            = $(FOOMATICEXE1)
FOOMATICEXE1            = Foomatic
OMNI_PATH               = ..
OMNI_LIB_PATH           = ..

all:	$(FOOMATICEXES)

run:	$(FOOMATICEXES)
	@(cd ..; . ./setit; cd Foomatic; ./$(FOOMATICEXE1))

include ../common.mak

clean:
	-@rm *.o
	-@rm errors
	-@rm core
	-@rm lib*.so
	-@rm depend.mak
	-@rm $(FOOMATICEXE1)
	-@rm -rf foomatic-db

$(FOOMATICEXE1):	$(FOOMATICEXE1).o  omni2foo.o
	$(CC) -o $@ $^ $(LFLAGS)

# dependancies follow
#
# @TBD generate a reverse set of dependancies.  That is, depend.mak depends
#      on the source files and if those files change, then new dependancies
#      need to be made and reloaded
ifeq "$(shell test ! -f depend.mak && echo yes)" "yes"
ifeq  "$(shell $(CC) $(CFLAGS) -M *.cpp > depend.mak)" ""
endif
endif
include depend.mak
