#-----------------------------------------------------------------------------
#
# NcFTP vis makefile for the platform @OS@, on the host @host@.
#
#-----------------------------------------------------------------------------

CC=@CC@
CFLAGS=@CFLAGS@
#CC=gcc
#CFLAGS=-O2 -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wshadow -Wbad-function-cast -Wwrite-strings -Wconversion
VPATH=@srcdir@
CPPFLAGS=@CPPFLAGS@ -I. -I../libncftp -I../Strn -I../sio
prefix=@prefix@
exec_prefix=@exec_prefix@
BINDIR=@bindir@

CURSESLIBS=@LIBCURSES@
LIBS=$(CURSESLIBS) @LIBS@
STRIPFLAG=-s
LDFLAGS=-L../libncftp -L../Strn -L../sio @LDFLAGS@

# Any -D definitions:
DEFS=-Dvis -DNCFTPPATH=\"$(BINDIR)/ncftp\" @DEFS@

DPROGS=@VIS_DPROGS@

all: $(DPROGS)
	-@echo 'Done making NcFTP full-screen utilities.'

../bin/ncftpbookmarks@EXEEXT@: bmed.c wgets.@OBJEXT@ wutil.@OBJEXT@ pref.@OBJEXT@ preffw.@OBJEXT@ util.@OBJEXT@ bookmark.@OBJEXT@ version.@OBJEXT@ bmed.h wgets.h syshdrs.h ../libncftp/libncftp.a
	$(CC) $(CFLAGS) $(DEFS) $(CPPFLAGS) bmed.c wgets.@OBJEXT@ wutil.@OBJEXT@ pref.@OBJEXT@ preffw.@OBJEXT@ util.@OBJEXT@ bookmark.@OBJEXT@ version.@OBJEXT@ -o ../bin/ncftpbookmarks@EXEEXT@ $(LDFLAGS) -lncftp -lStrn -lsio $(LIBS) $(STRIPFLAG)

bookmark.@OBJEXT@: ../ncftp/bookmark.c ../ncftp/bookmark.h syshdrs.h
	$(CC) $(CFLAGS) $(DEFS) $(CPPFLAGS) ../ncftp/bookmark.c -c

pref.@OBJEXT@: ../ncftp/pref.c ../ncftp/pref.h syshdrs.h
	$(CC) $(CFLAGS) $(DEFS) $(CPPFLAGS) ../ncftp/pref.c -c

preffw.@OBJEXT@: ../ncftp/preffw.c ../ncftp/pref.h syshdrs.h
	$(CC) $(CFLAGS) $(DEFS) $(CPPFLAGS) ../ncftp/preffw.c -c

util.@OBJEXT@: ../ncftp/util.c ../ncftp/util.h syshdrs.h
	$(CC) $(CFLAGS) $(DEFS) $(CPPFLAGS) ../ncftp/util.c -c

version.@OBJEXT@: ../ncftp/version.c
	$(CC) $(CFLAGS) $(DEFS) $(CPPFLAGS) ../ncftp/version.c -c

wutil.@OBJEXT@: wutil.c wutil.h syshdrs.h
	$(CC) $(CFLAGS) $(DEFS) $(CPPFLAGS) wutil.c -c

wgets.@OBJEXT@: wgets.c wgets.h syshdrs.h
	$(CC) $(CFLAGS) $(DEFS) $(CPPFLAGS) wgets.c -c

clean:
	/bin/rm -f $(DPROGS) *.@OBJEXT@ core

PACKAGE=Makefile.in bmed.c bmed.h syshdrs.h wgets.c wgets.h wutil.c wutil.h

TMPDIR=/tmp
TARDIR=vis

tarcp:
	-@mkdir -p $(TMPDIR)/TAR/$(TARDIR)
	-@chmod ga+r $(PACKAGE)
	-@chmod 755 $(TMPDIR)/TAR/$(TARDIR)
	cp -pr $(PACKAGE) $(TMPDIR)/TAR/$(TARDIR)
