wmail: use automake.
This commit is contained in:
parent
dc8827d41a
commit
7740071745
28
wmail/.gitignore
vendored
28
wmail/.gitignore
vendored
|
@ -1,10 +1,20 @@
|
||||||
|
/aclocal.m4
|
||||||
|
/autom4te.cache/
|
||||||
|
/compile
|
||||||
|
/config.h
|
||||||
|
/config.h.in
|
||||||
|
/config.h.in~
|
||||||
|
/config.log
|
||||||
|
/config.status
|
||||||
|
/configure
|
||||||
|
/depcomp
|
||||||
|
/INSTALL
|
||||||
|
/install-sh
|
||||||
Makefile
|
Makefile
|
||||||
autom4te.cache/
|
Makefile.in
|
||||||
config.h
|
/missing
|
||||||
config.h.in
|
/src/.deps/
|
||||||
config.h.in~
|
/src/*.o
|
||||||
config.log
|
/src/wmail
|
||||||
config.status
|
/stamp-h1
|
||||||
configure
|
/wmail-*.tar.gz
|
||||||
src/*.o
|
|
||||||
src/wmail
|
|
||||||
|
|
3
wmail/Makefile.am
Normal file
3
wmail/Makefile.am
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
SUBDIRS = src
|
||||||
|
|
||||||
|
EXTRA_DIST = wmailrc-sample
|
|
@ -1,29 +0,0 @@
|
||||||
# process this file with configure to create a Makefile from it
|
|
||||||
#
|
|
||||||
# Makefile for wmail.
|
|
||||||
# Toplevel Makefile.
|
|
||||||
# Usage: make ..........: creates the wmail binary.
|
|
||||||
# make install ..: installs the binary under your default user binary
|
|
||||||
# directory.
|
|
||||||
# make uninstall : removes any installed wmail files.
|
|
||||||
# make clean ....: cleans the src directory.
|
|
||||||
|
|
||||||
@SET_MAKE@
|
|
||||||
|
|
||||||
default all target: wmail
|
|
||||||
|
|
||||||
wmail:
|
|
||||||
@cd src; $(MAKE) -f Makefile wmail
|
|
||||||
|
|
||||||
install:
|
|
||||||
@if ! test -f src/wmail; then $(MAKE) wmail; fi
|
|
||||||
@echo "Installing the binary under @bindir@."
|
|
||||||
@cp -f src/wmail @bindir@
|
|
||||||
|
|
||||||
uninstall:
|
|
||||||
@echo "Removing wmail files from your system."
|
|
||||||
@rm -f @bindir@/wmail
|
|
||||||
|
|
||||||
clean:
|
|
||||||
@echo "Cleaning src directory."
|
|
||||||
@cd src; $(MAKE) -f Makefile clean
|
|
6
wmail/autogen
Executable file
6
wmail/autogen
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
AUTOMAKE="automake --add-missing"
|
||||||
|
export AUTOMAKE
|
||||||
|
|
||||||
|
exec autoreconf "$@"
|
|
@ -1,10 +1,12 @@
|
||||||
dnl Process this file with autoconf to produce a configure script.
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
AC_INIT(src/wmail.c)
|
AC_INIT([wmail], [2.0], [wmaker-dev@googlegroups.com])
|
||||||
AC_CONFIG_HEADERS(config.h)
|
AC_CONFIG_HEADERS(config.h)
|
||||||
|
AC_CONFIG_SRCDIR([src/wmail.c])
|
||||||
|
AM_INIT_AUTOMAKE([foreign])
|
||||||
|
|
||||||
dnl Checks for programs.
|
dnl Checks for programs.
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AC_PROG_MAKE_SET
|
AC_PROG_INSTALL
|
||||||
|
|
||||||
dnl Checks for pkg-config modules.
|
dnl Checks for pkg-config modules.
|
||||||
PKG_CHECK_MODULES([X11], [x11])
|
PKG_CHECK_MODULES([X11], [x11])
|
||||||
|
@ -27,23 +29,23 @@ dnl Checks for library functions.
|
||||||
AC_FUNC_FNMATCH
|
AC_FUNC_FNMATCH
|
||||||
AC_FUNC_UTIME_NULL
|
AC_FUNC_UTIME_NULL
|
||||||
AC_FUNC_VPRINTF
|
AC_FUNC_VPRINTF
|
||||||
AC_CHECK_FUNCS(strdup strstr memcpy)
|
AC_CHECK_FUNCS([strdup strstr memcpy])
|
||||||
|
|
||||||
dnl Checks for libraries.
|
dnl Checks for libraries.
|
||||||
|
|
||||||
dnl Enable Debugging?
|
dnl Enable Debugging?
|
||||||
AC_ARG_ENABLE(debug,
|
AC_ARG_ENABLE(debug, [ --enable-debug enable debugging ],
|
||||||
[ --enable-debug enable debugging ],, enable_debug=no)
|
enable_debug=yes, enable_debug=no)
|
||||||
if test "$enable_debug" = yes; then
|
AC_MSG_CHECKING([whether to enable debugging])
|
||||||
CPPFLAGS="$CPPFLAGS -DDEBUG -D_XOPEN_SOURCE=600"
|
AC_MSG_RESULT([$enable_debug])
|
||||||
CFLAGS="$CFLAGS -std=c99 -pedantic -Wall -Wextra -g"
|
AM_CONDITIONAL([ENABLE_DEBUG], [test x$enable_debug = xyes])
|
||||||
fi
|
|
||||||
|
|
||||||
dnl Use delt's pixmaps instead of the default ones?
|
dnl Use delt's pixmaps instead of the default ones?
|
||||||
AC_ARG_ENABLE(delt_xpms,
|
AC_ARG_ENABLE(delt_xpms, [ --enable-delt-xpms enable delt's pixmaps ],
|
||||||
[ --enable-delt-xpms enable delt's pixmaps ],, enable_delt_xpms=no)
|
enable_delt_xpms=yes, enable_delt_xpms=no)
|
||||||
if test "$enable_delt_xpms" = yes; then
|
AC_MSG_CHECKING([whether to enable delt's pixmaps])
|
||||||
CPPFLAGS="$CPPFLAGS -DUSE_DELT_XPMS"
|
AC_MSG_RESULT([$enable_delt_xpms])
|
||||||
fi
|
AM_CONDITIONAL([ENABLE_DELT_XPMS], [test x$enable_delt_xpms = xyes])
|
||||||
|
|
||||||
AC_OUTPUT(Makefile src/Makefile)
|
AC_CONFIG_FILES([Makefile src/Makefile])
|
||||||
|
AC_OUTPUT
|
||||||
|
|
21
wmail/src/Makefile.am
Normal file
21
wmail/src/Makefile.am
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
AM_CPPFLAGS =
|
||||||
|
AM_CFLAGS = $(dockapp_CFLAGS) $(X11_CFLAGS)
|
||||||
|
|
||||||
|
if ENABLE_DEBUG
|
||||||
|
AM_CPPFLAGS += -DDEBUG -D_XOPEN_SOURCE=600
|
||||||
|
AM_CFLAGS += -std=c99 -pedantic -Wall -Wextra
|
||||||
|
endif
|
||||||
|
|
||||||
|
if ENABLE_DELT_XPMS
|
||||||
|
AM_CPPFLAGS += -DUSE_DELT_XPMS
|
||||||
|
endif
|
||||||
|
|
||||||
|
LIBS += $(dockapp_LIBS) $(X11_LIBS)
|
||||||
|
|
||||||
|
bin_PROGRAMS = wmail
|
||||||
|
|
||||||
|
wmail_SOURCES = common.c common.h \
|
||||||
|
config.c config.h \
|
||||||
|
wmail.c \
|
||||||
|
xpm/*.xpm \
|
||||||
|
xpm_delt/*.xpm
|
|
@ -1,26 +0,0 @@
|
||||||
# process this file with configure to create a Makefile from it
|
|
||||||
#
|
|
||||||
# Makefile for wmail.
|
|
||||||
# Makes the wmail dockapp binary and cleans the directory, respectively.
|
|
||||||
|
|
||||||
LIBS = @LIBS@ @dockapp_LIBS@ @X11_LIBS@
|
|
||||||
CC = @CC@
|
|
||||||
CFLAGS = @CFLAGS@ @dockapp_CFLAGS@ @X11_CFLAGS@
|
|
||||||
CPPFLAGS = @DEFS@ @CPPFLAGS@
|
|
||||||
|
|
||||||
default all target: wmail
|
|
||||||
|
|
||||||
wmail: wmail.o common.o config.o
|
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $^ $(LIBS)
|
|
||||||
|
|
||||||
wmail.o: wmail.c common.h config.h ../config.h xpm/main.xpm xpm/symbols.xpm xpm/numbers.xpm xpm/button.xpm xpm/chars.xpm
|
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $<
|
|
||||||
|
|
||||||
common.o: common.c common.h ../config.h
|
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $<
|
|
||||||
|
|
||||||
config.o: config.c config.h common.h ../config.h
|
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $<
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f wmail core *.o *~
|
|
Loading…
Reference in a new issue