/*
 * $Id: Jmakefile,v 1.30 2004/08/28 06:36:27 rmanfredi Exp $
 *
 * Copyright (c) 2003, Raphael Manfredi
 *
 * Jmakefile for gtk-gnutella.
 *
 *----------------------------------------------------------------------
 * This file is part of gtk-gnutella.
 *
 *  gtk-gnutella 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.
 *
 *  gtk-gnutella 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 gtk-gnutella; if not, write to the Free Software
 *  Foundation, Inc.:
 *      59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *----------------------------------------------------------------------
 */

;# $Id: Jmakefile,v 1.30 2004/08/28 06:36:27 rmanfredi Exp $

all::		/* So that default target is not clobber! */

SetSubdirs(core lib ui if)
DependSubdirs()

SRC = main.c
OBJ = main.o

/* Additional flags for GTK compilation, added in the substituted section */
++GTK_CFLAGS $gtkcflags
++GTK_LDFLAGS $gtkldflags

/* Add the libxml2 flags */
++XML2_CFLAGS $xmlcflags
++XML2_LDFLAGS $xmlldflags

/*
 * Due to cross-referencing between the GUI and the core, libcore.a wraps
 * the GUI libraries and the libgtk-common.a library wraps the libgtkx.a
 * so that all functions can be resolved properly.
 */

EXTRA = \
	if/bridge/ui2c.o \
	if/bridge/c2ui.o \
	if/gnet_property.o \
	if/gui_property.o

CFLAGS = -I.. -I. $(GTK_CFLAGS) $(XLM2_CFLAGS) -DCURDIR=$(CURRENT)
DPFLAGS = $(CFLAGS)
LDFLAGS = \
	-Lcore -lcore \
	-Lui/gtk \
	-lgtk-common -lgtkx -lgtk-common -lcore \
	-Llib -lshared \
	$(GTK_LDFLAGS) $(XML2_LDFLAGS)

RemoteTargetDependency(gtk-gnutella, lib, libshared.a)
RemoteTargetDependency(gtk-gnutella, core, libcore.a)
RemoteTargetDependency(gtk-gnutella, ui/gtk, libgtk-common.a)
RemoteTargetDependency(gtk-gnutella, ui/gtk, libgtkx.a)
RemoteTargetDependency(gtk-gnutella, if/bridge, ui2c.o)
RemoteTargetDependency(gtk-gnutella, if/bridge, c2ui.o)
RemoteTargetDependency(gtk-gnutella, if, gnet_property.o)
RemoteTargetDependency(gtk-gnutella, if, gui_property.o)
RemoteTargetDependency(main.o, if, gnet_property.h)
RemoteTargetDependency(main.o, if, gui_property.h)

DependTarget()
NormalProgramTarget(gtk-gnutella, $(SRC), $(OBJ) $(EXTRA))
InstallProgram(gtk-gnutella, $(BINDIR))
InstallManPage(gtk-gnutella, $(MANSRC))
