wmtop: Switch build system to autotools.
To take advantage of this, we rename CHANGES to ChangeLog and also replace the WMTOP_VERSION macro with PACKAGE_VERSION.
This commit is contained in:
parent
5fd5619cc4
commit
a7a8760464
|
@ -1,46 +0,0 @@
|
|||
DEBUG = -DPARANOID
|
||||
LIBDIR = -L/usr/X11R6/lib
|
||||
LIBS = -lXpm -lXext -lX11 -ldockapp
|
||||
INCS = -I/usr/X11R6/share/include -I/usr/X11R6/include
|
||||
OBJS = wmtop.o
|
||||
OPTS = -O3 -g -Wall
|
||||
FLAGS = $(DEBUG) $(OPTS) -D$(OS)
|
||||
MAKE = make
|
||||
CC = cc
|
||||
PREFIX ?= /usr/local
|
||||
|
||||
default:
|
||||
@echo Use '"make os"' where '"os"' is one of:
|
||||
@echo " freebsd"
|
||||
@echo " linux"
|
||||
@echo Then '"make install"'
|
||||
|
||||
freebsd:
|
||||
$(MAKE) OS=FREEBSD all
|
||||
|
||||
linux:
|
||||
$(MAKE) OS=LINUX all
|
||||
|
||||
.c.o:
|
||||
$(CC) $(FLAGS) $(INCS) -c $< -o $*.o
|
||||
|
||||
wmtop: $(OBJS) wmtop.o
|
||||
$(CC) $(FLAGS) -o wmtop $(OBJS) $(LIBDIR) $(LIBS)
|
||||
@echo Now you can do a '"make install"'
|
||||
|
||||
all: wmtop
|
||||
|
||||
clean:
|
||||
for i in $(OBJS) ; do \
|
||||
rm -f $$i ; \
|
||||
done
|
||||
rm -f wmtop
|
||||
rm -f *~
|
||||
|
||||
install: wmtop
|
||||
strip wmtop
|
||||
cp -f wmtop $(PREFIX)/bin/
|
||||
chmod 755 $(PREFIX)/bin/wmtop
|
||||
cp -f wmtop.1 $(PREFIX)/man/man1
|
||||
chmod 644 $(PREFIX)/man/man1/wmtop.1
|
||||
@echo "wmtop Installation finished..."
|
9
wmtop/Makefile.am
Normal file
9
wmtop/Makefile.am
Normal file
|
@ -0,0 +1,9 @@
|
|||
bin_PROGRAMS = wmtop
|
||||
wmtop_SOURCES = wmtop.c xpm/wmtop-rainbow.xpm xpm/wmtop-neon1.xpm \
|
||||
xpm/wmtop-default.xpm xpm/wmtop-neon2.xpm xpm/wmtop-lcd.xpm
|
||||
|
||||
AM_CFLAGS = $(x11_CFLAGS) $(xext_CFLAGS) $(xpm_CFLAGS) $(dockapp_CFLAGS)
|
||||
LIBS += $(x11_LIBS) $(xext_LIBS) $(xpm_LIBS) $(dockapp_LIBS)
|
||||
|
||||
dist_man_MANS = wmtop.1
|
||||
EXTRA_DIST = BUGS
|
18
wmtop/configure.ac
Normal file
18
wmtop/configure.ac
Normal file
|
@ -0,0 +1,18 @@
|
|||
AC_INIT([wmtop], [0.84], [wmaker-dev@lists.windowmaker.org])
|
||||
AM_INIT_AUTOMAKE([foreign subdir-objects])
|
||||
AC_CONFIG_SRCDIR([configure.ac])
|
||||
AC_CANONICAL_HOST
|
||||
AS_CASE([$host_os],
|
||||
[linux*],
|
||||
[AC_DEFINE(LINUX)],
|
||||
[*freebsd*],
|
||||
[AC_DEFINE(FREEBSD)],
|
||||
[AC_MSG_ERROR([unknown operating system "$host_os".])]
|
||||
)
|
||||
AC_PROG_CC
|
||||
PKG_CHECK_MODULES([x11],[x11])
|
||||
PKG_CHECK_MODULES([xext],[xext])
|
||||
PKG_CHECK_MODULES([xpm],[xpm])
|
||||
PKG_CHECK_MODULES([dockapp],[dockapp])
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_OUTPUT
|
|
@ -76,8 +76,6 @@
|
|||
/* Defines */
|
||||
/******************************************/
|
||||
|
||||
#define WMTOP_VERSION "0.9"
|
||||
|
||||
/*
|
||||
* XXX: I shouldn't really use this WMTOP_BUFLENGTH variable but scanf is so
|
||||
* lame and it'll take me a while to write a replacement.
|
||||
|
@ -1007,5 +1005,5 @@ void usage(void) {
|
|||
/******************************************/
|
||||
|
||||
void printversion(void) {
|
||||
fprintf(stderr, "wmtop v%s\n",WMTOP_VERSION);
|
||||
fprintf(stderr, "wmtop v%s\n",PACKAGE_VERSION);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue