##############################################################################
-# Copyright (c) 1998 Free Software Foundation, Inc. #
+# Copyright 2018-2019,2020 Thomas E. Dickey #
+# Copyright 1998-2015,2018 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
# authorization. #
##############################################################################
#
-# Author: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1996
+# Author: Juergen Pfeifer, 1996
#
-# Version Control
-# $Revision: 1.25 $
+# $Id: Makefile.in,v 1.59 2020/02/02 23:34:34 tom Exp $
#
.SUFFIXES:
-SHELL = /bin/sh
+SHELL = @SHELL@
+VPATH = @srcdir@
THIS = Makefile
-x = @PROG_EXT@
+x = @EXEEXT@
srcdir = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
+bindir = @bindir@
+datarootdir = @datarootdir@
+datadir = @datadir@
libdir = @libdir@
includedir = @includedir@
-INSTALL = @INSTALL@
+INSTALL = @INSTALL@ @INSTALL_OPT_O@
INSTALL_DATA = @INSTALL_DATA@
AWK = @AWK@
CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@)
+REL_VERSION = @cf_cv_rel_version@
+ABI_VERSION = @cf_cv_abi_version@
+LOCAL_LIBDIR = @top_builddir@/lib
+
LINK = $(CC)
LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@
RANLIB = @RANLIB@
################################################################################
-ada_srcdir=../src
+BINDIR = $(DESTDIR)$(bindir)
+DATADIR = $(DESTDIR)$(datadir)
+LIBDIR = $(DESTDIR)$(libdir)
-LD_FLAGS = @LD_MODEL@ $(LOCAL_LIBS) @LDFLAGS@ @LIBS@ @LOCAL_LDFLAGS2@ $(LDFLAGS)
+MY_DATADIR = $(DATADIR)/@ADA_LIBNAME@
+THIS_DATADIR = $(datadir)/@ADA_LIBNAME@
-ADA = @cf_ada_compiler@
-ADAFLAGS = @ADAFLAGS@ -I$(srcdir)
+################################################################################
+ada_srcdir = ../src
-ADAMAKE = @cf_ada_make@
-ADAMAKEFLAGS = -a -A$(srcdir) -A$(ada_srcdir) -A$(srcdir)/$(ada_srcdir)
+LD_FLAGS = @LD_MODEL@ $(LOCAL_LIBS) @LDFLAGS@ @LIBS@ @LOCAL_LDFLAGS2@ $(LDFLAGS)
-ALIB = @cf_ada_package@
-ABASE = $(ALIB)-curses
+ADA = @cf_ada_compiler@
+ADAPREP = gnatprep
+ADAFLAGS = @ADAFLAGS@ -I$(srcdir)
-CARGS =-cargs $(ADAFLAGS)
-LARGS =-largs -L../../lib $(LD_FLAGS) -lAdaCurses -lncurses@LIB_SUFFIX@
+ADAMAKE = @cf_ada_make@
+ADAMAKEFLAGS = -a \
+ -A$(srcdir) \
+ -A$(ada_srcdir) \
+ -A$(srcdir)/$(ada_srcdir)
-PROGS = tour rain
+ALIB = @cf_ada_package@
+ABASE = $(ALIB)-curses
+THISLIB = sample
-TOUR_OBJS = tour.o sample.o sample-curses_demo.o sample-explanation.o \
- sample-form_demo.o sample-function_key_setting.o \
- sample-header_handler.o sample-helpers.o \
- sample-keyboard_handler.o sample-manifest.o sample-menu_demo.o \
- sample-menu_demo-aux.o sample-text_io_demo.o \
- sample-curses_demo-attributes.o sample-curses_demo-mouse.o \
- sample-form_demo-aux.o sample-my_field_type.o
+CARGS = -cargs $(ADAFLAGS)
+LARGS = -largs -L../lib -l@ADA_LIBNAME@ @TEST_ARG2@ $(LD_FLAGS) @TEST_LIBS2@
-RAIN_OBJS = rain.o status.o
+PROGS = tour$x ncurses$x @USE_GNAT_SIGINT@ rain$x
-all :: tour$x rain$x
- @
+all :: $(PROGS)
+ @echo made $@
sources :
- @
+ @echo made $@
libs \
install \
install.libs ::
- @
+ @echo made $@
uninstall \
uninstall.libs ::
- @
+ @echo made $@
-tour$x : explain.msg
- $(ADAMAKE) $(ADAMAKEFLAGS) tour $(CARGS) $(LARGS)
+install.examples :: $(BINDIR) $(PROGS)
+ $(INSTALL) $(PROGS) $(BINDIR)
+
+install.examples :: $(MY_DATADIR)
+ $(INSTALL_DATA) explain.txt $(MY_DATADIR)
+
+uninstall.examples ::
+ -cd $(BINDIR) && rm -f $(PROGS)
+ -rmdir $(BINDIR)
+ -rm -f $(MY_DATADIR)/explain.txt
+ -rmdir $(MY_DATADIR)
-explain.msg: $(srcdir)/explain.txt
- cp $(srcdir)/explain.txt $@
+$(BINDIR) \
+$(MY_DATADIR) :
+ mkdir -p $@
-rain$x :
+AUTO_SRC = $(THISLIB)-explanation.adb
+
+ncurses$x : $(AUTO_SRC)
+ $(ADAMAKE) $(ADAMAKEFLAGS) ncurses $(CARGS) $(LARGS)
+
+tour$x : $(AUTO_SRC)
+ $(ADAMAKE) $(ADAMAKEFLAGS) tour $(CARGS) $(LARGS)
+
+rain$x : $(AUTO_SRC)
$(ADAMAKE) $(ADAMAKEFLAGS) rain $(CARGS) $(LARGS)
mostlyclean:
- @
+ @echo made $@
clean :: mostlyclean
- rm -f *.o *.ali b_t*.* *.s $(PROGS) a.out core b_*_test.c *.xr[bs] explain.msg
+ rm -f *.o *.ali b_t*.* *.s $(PROGS) a.out core b_*_test.c *.xr[bs] \
+ rm -f $(AUTO_SRC)
+ rm -f trace screendump b~*.ad[bs]
distclean :: clean
rm -f Makefile
realclean :: distclean
- @
-
+ @echo made $@
+$(THISLIB)-explanation.adb : $(srcdir)/$(THISLIB)-explanation.adb_p
+ rm -f $@
+ $(AWK) -v this_datadir=$(THIS_DATADIR) -f $(srcdir)/split-path.awk < $(srcdir)/$(THISLIB)-explanation.adb_p >$@