DEPLIBS = XawClientDepLibs
LOCAL_LIBRARIES = XawClientLibs

/* The next five things are probably the only things you might
 * need to change here.
 *  However, there are misc. constants in "defs.h" you might want to
 *   play with.
 *
 * UNCOMPRESS: put your favourite  uncompress command in here.
 *   If you don't have gzip... get it!
 *   If you still won't.. well then you'll have to change the line
 *     to something that will uncompress the file to stdout
 *   You'll also have to change the UNCOMPRESSEXT to .Z, or whatever's
 *   appropriate to you.
 *
 * Note: If you don't choose to compress your dictionaries, for 
 * whatever reason.. that's okay.
 * If it doesn't have the UNCOMPRESSEXT extension, kdrill will assume
 * it is not compressed
 */

/* You might need the full pathname to gzip */
UNCOMPRESS = gzip -d -c
UNCOMPRESSEXT = .gz
DICTLOCATION= /usr/local/lib/kanjidic.gz
EDICTLOCATION= /usr/local/lib/edict.gz


# IF you have a BSD system, and thereby presumably don't have
# srand, or lrand48, please uncomment
# the  -DBSD line

# ISBSD = -DBSD 

# If you don't have memset, comment this out
# memset is an efficiency tweak

MEMSET=-DHAS_MEMSET

# Where to install?
# BINDIR = /usr/local/bin/X11



COMPRESSDEFS = -DUNCOMPRESS='"$(UNCOMPRESS)"' \
		-DUNCOMPRESSEXT='"$(UNCOMPRESSEXT)"'

/******************************************************************
 *   Okay, halt, whoa, cease, desist, go no further...            *
 ******************************************************************/


DICTDEFS = -DDICTLOCATION='"KDrill*kdictfile:	 $(DICTLOCATION)"'
EDICTDEFS = -DEDICTLOCATION='"KDrill*edictfile:	 $(EDICTLOCATION)"'


/* 
 * I don't like putting <X11/...> for everything, so..
 */
INCLUDES = -I$(INCROOT)/X11

/*
 *  If you want to force things...
 * CDEBUGFLAGS = -g -ansi -pedantic
 */

EXTRA_DEFINES = $(ISBSD) $(MEMSET)

/*CDEBUGFLAGS = -g */

SRCS = main.c options.c readfile.c game.c init.c widgets.c grades.c \
	frequency.c mainwindow.c search.c log.c utils.c kanasearch.c \
	convert.c
OBJS = main.o options.o readfile.o game.o init.o widgets.o grades.o \
	frequency.o mainwindow.o search.o log.o utils.o kanasearch.o \
	convert.o

ComplexProgramTarget(kdrill)

InstallProgram(kdrill, INSTALL_DIR)

SpecialObjectRule(utils.o,, $(COMPRESSDEFS) )
SpecialObjectRule(init.o,, $(DICTDEFS) $(EDICTDEFS) )
InstallAppDefaults(KDrill)

