--- /dev/null
+*.o
+*.so*
+config.*
+
+.depends
+autom4te.cache
+configure
+madtty.pc
+Makefile
OBJECTS=$(patsubst %.c,%.o,$(SOURCES))
-ROTE_VERSION=@PACKAGE_VERSION@
-ROTE_SONAME=librote.so.0
+MADTTY_VERSION=@PACKAGE_VERSION@
+MADTTY_SONAME=libmadtty.so.0
CC=@CC@
CFLAGS=@CFLAGS@ -Wall -fPIC
includedir=@includedir@
bindir=@bindir@
-all: librote.so.$(ROTE_VERSION)
+all: libmadtty.so.$(MADTTY_VERSION)
install: all
- mkdir -p $(DESTDIR)$(includedir)/rote
- rm -f $(DESTDIR)$(includedir)/rote/*.h
- cp rote.h $(DESTDIR)$(includedir)/rote
+ mkdir -p $(DESTDIR)$(includedir)/madtty
+ rm -f $(DESTDIR)$(includedir)/madtty/*.h
+ cp rote.h $(DESTDIR)$(includedir)/madtty
mkdir -p $(DESTDIR)$(libdir)
- cp librote.so.$(ROTE_VERSION) $(DESTDIR)$(libdir)
- cd $(DESTDIR)$(libdir) && ln -sf librote.so.$(ROTE_VERSION) librote.so
- cd $(DESTDIR)$(libdir) && ln -sf librote.so.$(ROTE_VERSION) $(ROTE_SONAME)
- chmod 755 rote-config
- mkdir -p $(DESTDIR)$(bindir)
- cp -p rote-config $(DESTDIR)$(bindir)
+ cp libmadtty.so.$(MADTTY_VERSION) $(DESTDIR)$(libdir)
+ cd $(DESTDIR)$(libdir) && ln -sf libmadtty.so.$(MADTTY_VERSION) libmadtty.so
+ cd $(DESTDIR)$(libdir) && ln -sf libmadtty.so.$(MADTTY_VERSION) $(MADTTY_SONAME)
+ mkdir -p $(DESTDIR)$(libdir)/pkgconfig
+ cp madtty.pc $(DESTDIR)$(libdir)/pkgconfig
@echo "-----------------------------------------------------------"
- @echo "ROTE - Our Own Terminal Emulation Library v$(ROTE_VERSION)"
+ @echo "MADTTY - the Mad tty Emulation Library v$(MADTTY_VERSION)"
@echo
@echo "Include files installed at: $(DESTDIR)$(includedir)"
@echo "Library files installed at: $(DESTDIR)$(libdir)"
- @echo "rote-config executable : $(DESTDIR)$(bindir)/rote-config"
- @echo
- @echo "To find out what compiler arguments you should use to"
- @echo "compile programs that use rote, use the rote-config"
- @echo "program (make sure $(DESTDIR)$(bindir) is in your path)."
@echo "-----------------------------------------------------------"
-librote.so.$(ROTE_VERSION): $(OBJECTS)
- $(CC) $(CFLAGS) -shared -o $@ -Wl,-soname=$(ROTE_SONAME) $(OBJECTS) $(LDFLAGS) $(LIBS)
+libmadtty.so.$(MADTTY_VERSION): $(OBJECTS)
+ $(CC) $(CFLAGS) -shared -o $@ -Wl,-soname=$(MADTTY_SONAME) $(OBJECTS) $(LDFLAGS) $(LIBS)
.depends: $(SOURCES) $(HEADERS)
$(CC) $(CFLAGS) -MM $(SOURCES) >.depends
-include .depends
clean:
- rm -f *.o .depends librote.so.*
+ rm -f *.o .depends libmadtty.so.*
pristine: clean
- rm -rf autom4te.cache configure config.status config.log Makefile rote-config
+ rm -rf autom4te.cache configure config.status config.log Makefile madtty.pc
.PHONY: clean all install pristine
dnl Process this file with autoconf to produce a configure script.
-AC_INIT([rote], 0.3.0)
+AC_INIT([maddty], 0.0.0)
AC_SUBST(PACKAGE_NAME)
AC_SUBST(PACKAGE_VERSION)
AC_CHECK_HEADERS([sys/types.h unistd.h stdlib.h string.h])
dnl Check for libraries
-AC_ARG_ENABLE([ncurses],AS_HELP_STRING([--disable-ncurses],[disables ncurses support (default enabled)]),[enable_curses=n],[enable_curses=y])
-
+AC_ARG_ENABLE([ncurses],
+ AS_HELP_STRING([--disable-ncurses],
+ [disables ncurses support (default enabled)]),
+ [enable_curses=n],[enable_curses=y])
if test "$enable_curses" = y; then
- AC_CHECK_LIB([ncurses], [initscr], [],
- AC_MSG_ERROR([Need ncurses to compile ncurses support.]))
- CFLAGS="$CFLAGS -DUSE_NCURSES"
+ AC_CHECK_LIB([ncurses], [initscr], [],
+ AC_MSG_ERROR([Need ncurses to compile ncurses support.]))
+ CFLAGS="$CFLAGS -DUSE_NCURSES"
fi
-AC_ARG_ENABLE([pty],AS_HELP_STRING([--disable-pty],[disables pty support (default enabled)]),[enable_pty=n],[enable_pty=y])
+AC_ARG_ENABLE([pty],
+ AS_HELP_STRING([--disable-pty],
+ [disables pty support (default enabled)]),
+ [enable_pty=n],[enable_pty=y])
if test "$enable_pty" = y; then
- AC_CHECK_LIB([util], [forkpty], [],
- AC_MSG_ERROR([Need util library (forkpty function) to compile pty support.]))
- CFLAGS="$CFLAGS -DUSE_PTY"
+ AC_CHECK_LIB([util], [forkpty], [],
+ AC_MSG_ERROR([Need util library (forkpty function) to compile pty support.]))
+ CFLAGS="$CFLAGS -DUSE_PTY"
fi
dnl Checks for library functions
AC_TYPE_PID_T
AC_TYPE_SIGNAL
-AC_CONFIG_FILES([Makefile rote-config])
+AC_CONFIG_FILES([Makefile madtty.pc])
AC_OUTPUT
--- /dev/null
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: madtty
+Description: tty in a tty library
+Version: @PACKAGE_VERSION@
+Conflicts:
+Libs: -L${libdir} -lmadtty
+Cflags: -I${includedir}
+++ /dev/null
-#!/bin/sh
-
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-version=@PACKAGE_VERSION@
-libs=@LIBS@
-
-if test $# -eq 0; then
- echo "Usage: rote-config [--cflags] [--libs]"
- echo " rote-config --version"
- echo
-fi
-
-while test $# -gt 0; do
- case $1 in
- --cflags)
- echo "-I$includedir"
- ;;
- --libs)
- echo "$libs -L$libdir -lrote"
- ;;
- --version)
- echo "ROTE version $version"
- echo "Our Own Terminal Emulation Library"
- echo
- echo "Copyright (c) 2004 Bruno T. C. de Oliveira"
- echo "All rights reserved"
- ;;
- esac
- shift
-done
-