#
#  vaconv: VisualArt's bitmap converter
#  Copyright (C) 2006 Haeleth
#
#  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 (at your option) 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., 59 Temple
#  Place - Suite 330, Boston, MA  02111-1307, USA.
#

PROGRAM = $(EXEDIR)/vaconv

CFILES []=
  image-bt
  g00-bt
  pdt-bt
  png-interface

CFLAGS += $(PNG_CFLAGS)
INCLUDES += $(OCAML_LIBRARY_DIR)
StaticCLibrary (vcprims, $(CFILES))

FILES []=
  image
  app
  g00
  pdt
  png
  rc8
  rct
  convert
  main

OCAML_CLIBS += vcprims
OCAML_LINK_FLAGS += $(mapprefix -cclib,$(PNG_LDFLAGS))
if $(FORCE_XMLLIGHT)
  OCAML_OTHER_LIBS += xml-light
  export
else
  OCAMLPACKS += xml-light
  export

OCamlProgram($(PROGRAM), $(FILES))

# Meta-rules:

.DEFAULT: all
.PHONY: all clean

all: $(PROGRAM)$(EXE)

clean:
  $(RM) *.omc $(addsuffix $(EXT_OBJ),$(CFILES)) $(addsuffixes .cmi .cmo .cmx $(EXT_OBJ),$(FILES)) vcprims$(EXT_LIB)
