X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=Ada95%2Fsamples%2FMakefile.in;h=495f70831fbbb0b300b491042595b6ab5d10af1f;hp=340e3bd4bcb449842ae6484e09cfd0a83e4fc19d;hb=9f479192e3ca3413d235c66bf058f8cc63764898;hpb=65ee0f2ca50c827bf271df7a087edd7da49f598d diff --git a/Ada95/samples/Makefile.in b/Ada95/samples/Makefile.in index 340e3bd4..495f7083 100644 --- a/Ada95/samples/Makefile.in +++ b/Ada95/samples/Makefile.in @@ -1,5 +1,6 @@ ############################################################################## -# Copyright (c) 1998-2005,2008 Free Software Foundation, Inc. # +# Copyright 2018-2020,2021 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"), # @@ -28,38 +29,42 @@ # # Author: Juergen Pfeifer, 1996 # -# $Id: Makefile.in,v 1.35 2008/11/23 00:17:20 juergen Exp $ +# $Id: Makefile.in,v 1.63 2021/06/17 21:11:08 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@ LN_S = @LN_S@ CC = @CC@ -CFLAGS = @CFLAGS@ +CFLAGS = @CFLAGS@ @EXTRA_CFLAGS@ CPPFLAGS = @ACPPFLAGS@ \ -DHAVE_CONFIG_H -I$(srcdir) CCFLAGS = $(CPPFLAGS) $(CFLAGS) -CFLAGS_NORMAL = $(CCFLAGS) -CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE -CFLAGS_PROFILE = $(CCFLAGS) -pg +CFLAGS_NORMAL = $(CCFLAGS) -DNCURSES_STATIC +CFLAGS_DEBUG = $(CCFLAGS) -DNCURSES_STATIC @CC_G_OPT@ -DTRACE +CFLAGS_PROFILE = $(CCFLAGS) -DNCURSES_STATIC -pg CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@ CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@) @@ -73,47 +78,38 @@ 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) - -ADAMAKE = @cf_ada_make@ -ADAMAKEFLAGS = -a -A$(srcdir) -A$(ada_srcdir) -A$(srcdir)/$(ada_srcdir) +################################################################################ +ada_srcdir = ../src -ALIB = @cf_ada_package@ -ABASE = $(ALIB)-curses +LD_FLAGS = @LD_MODEL@ $(LOCAL_LIBS) @LDFLAGS@ @LIBS@ @LOCAL_LDFLAGS2@ $(LDFLAGS) -CARGS =-cargs $(ADAFLAGS) -LARGS =-largs @TEST_ARG2@ $(LD_FLAGS) -lAdaCurses - -PROGS = tour rain ncurses +ADA = @cf_ada_compiler@ +ADAPREP = gnatprep +ADAFLAGS = @ADAFLAGS@ -I$(srcdir) -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 +ADAMAKE = @cf_ada_make@ +ADAMAKEFLAGS = -a \ + -A$(srcdir) \ + -A$(ada_srcdir) \ + -A$(srcdir)/$(ada_srcdir) -RAIN_OBJS = rain.o status.o +ALIB = @cf_ada_package@ +ABASE = $(ALIB)-curses +THISLIB = sample -NCURSES_OBJS = ncurses.o ncurses2-getch_test.o \ - ncurses2-acs_and_scroll.o ncurses2-m.o \ - ncurses2-acs_display.o ncurses2-menu_test.o \ - ncurses2-attr_test.o ncurses2-overlap_test.o \ - ncurses2-color_edit.o ncurses2-slk_test.o \ - ncurses2-color_test.o ncurses2-test_sgr_attributes.o \ - ncurses2-demo_forms.o ncurses2-trace_set.o \ - ncurses2-demo_pad.o ncurses2-util.o \ - ncurses2-demo_panels.o ncurses2.o \ - ncurses2-flushinp_test.o +CARGS = -cargs $(ADAFLAGS) +LARGS = -largs -L../lib -l@ADA_LIBNAME@ @TEST_ARG2@ $(LD_FLAGS) @TEST_LIBS2@ +PROGS = tour$x ncurses$x @USE_GNAT_SIGINT@ rain$x -all :: tour$x rain$x ncurses$x +all :: $(PROGS) @echo made $@ sources : @@ -128,16 +124,31 @@ uninstall \ uninstall.libs :: @echo made $@ -ncurses$x : +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) + +$(BINDIR) \ +$(MY_DATADIR) : + mkdir -p $@ + +AUTO_SRC = $(THISLIB)-explanation.adb + +ncurses$x : $(AUTO_SRC) $(ADAMAKE) $(ADAMAKEFLAGS) ncurses $(CARGS) $(LARGS) -tour$x : explain.msg +tour$x : $(AUTO_SRC) $(ADAMAKE) $(ADAMAKEFLAGS) tour $(CARGS) $(LARGS) -explain.msg: $(srcdir)/explain.txt - cp $(srcdir)/explain.txt $@ - -rain$x : +rain$x : $(AUTO_SRC) $(ADAMAKE) $(ADAMAKEFLAGS) rain $(CARGS) $(LARGS) mostlyclean: @@ -145,10 +156,15 @@ mostlyclean: clean :: mostlyclean rm -f *.o *.ali b_t*.* *.s $(PROGS) a.out core b_*_test.c *.xr[bs] \ - explain.msg trace screendump b~*.ad[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 >$@