/*
 * $Id: Jmakefile,v 1.10 2004/11/08 14:29:23 rmanfredi Exp $
 *
 * Copyright (c) 2004, Raphael Manfredi
 *
 * Jmakefile for common sources.
 *
 *----------------------------------------------------------------------
 * 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.10 2004/11/08 14:29:23 rmanfredi Exp $

LSRC = \
	adns.c \
	aging.c \
	atoms.c \
	base32.c \
	base64.c \
	bg.c \
	cobs.c \
	cq.c \
	crc.c \
	eval.c \
	event.c \
	fifo.c \
	file.c \
	fuzzy.c \
	getdate.c \
	getline.c \
	glib-missing.c \
	hashlist.c \
	header.c \
	idtable.c \
	inputevt.c \
	iprange.c \
	iso3166.c \
	malloc.c \
	misc.c \
	pattern.c \
	prop.c \
	sha1.c \
	stats.c \
	tiger.c \
	tigertree.c \
	tm.c \
	url.c \
	urn.c \
	utf8.c \
	vendors.c \
	walloc.c \
	watcher.c \
	wordvec.c \
	zalloc.c \
	zlib_util.c

/* Object files are derived from source files */
LOBJ = \
|expand f!$(LSRC)!
	!f:\.c=.o \
-expand \\

/* Additional flags for glib compilation, added in the substituted section */
++GLIB_CFLAGS $glibcflags

;# Those extra flags are expected to be user-defined
CFLAGS = -I$(TOP) -I.. $(GLIB_CFLAGS) -DCURDIR=$(CURRENT)
DPFLAGS = $(CFLAGS)

NormalLibraryTarget(shared,$(LSRC),$(LOBJ))
DependTarget()

/*
 * Since getdate.c is in CVS, they can compile even if they lack yacc.
 */
getdate.c: getdate.y
	-$(YACC) $(JYFLAGS) $<
	-$(MV) y.tab.c $@

