# Generated automatically from Makefile.in by configure.
########
# Makefile for syncal

########
# Edit this to set top_builddir to the location of you pilot-link 
# installation. 
#
# If your pilot-link libraries are installed in /usr/lib and your
# header files are installed in /usr/include, then just leave this
# set to .
#
# otherwise:
#
# top_builddir = /home/john/pilot/src/pilot-link.0.9.1
#
top_builddir = .

##########
# Pick your C compiler
#
# CC = cc
#
CC = gcc

##########
# Where should I be installed?
#
INSTALLTOP = /usr/local
INSTALLBIN = $(INSTALLTOP)/bin
INSTALLMAN = $(INSTALLTOP)/man

###########
# Use the next line if shared libraries are installed on your system
#
LIBS =  -lm -lpisock
#
# Or, if they're not:
#
# LIBS =  -lm 

#++ kei
#############
# If Use with Japanese, define this.
#DEFINES = -DJapanese
#++ kei

#############
# If using GCC, use this:
#
CCLINK = $(CC) $(CFLAGS) $(LIBDIR)
#
# Otherwise, use this:
#
#CCLINK = $(LIBTOOLLINK)  $(PURELINK) $(PURIFY) $(CC) $(LDFLAGS) $(CFLAGS)

##############
# If shared libraries are not being used, uncomment this:
#
#PILIB = $(top_builddir)/libsock/libpisock.la


########################################
# You shouldn't need to change anything below this line.
#
# Unless you're smarter than me, which is entirely possible. [JTL]
#
LIBDIR = -L$(top_builddir)
INCDIR = -I$(top_builddir) -I/usr/include/libpisock
CFLAGS =  -Wall -w -O -g $(INCDIR) $(DEFINES)
SYNCAL_OBJS = syncal.o syncal_cat.c syncal_list.o syncal_dates.o\
	syncal_reconcile.o syncal_gmt.o
LIBTOOL = $(top_builddir)/libtool
LIBTOOLLINK = $(LIBTOOL) --mode=link


all: syncal
syncal: $(SYNCAL_OBJS)
	$(CCLINK) $(SYNCAL_OBJS) -o $@ $(LIBS)

syncal.o: syncal.h
syncal_list.o: syncal.h
syncal_dates.o: syncal.h
syncal_cat.o: syncal.h
syncal_reconcile.o: syncal.h

clean: 
	rm  -f  *.o *~ core syncal

install:
	install -d $(INSTALLBIN)
	install -d $(INSTALLMAN)/man1
	install -s -g root -o root -m 755 syncal $(INSTALLBIN)

	install -g root -o root -m 644 syncal.1 $(INSTALLMAN)/man1
