wmmisc: Switch to autotools for build.
This commit is contained in:
parent
1400fab143
commit
4db8f00e97
|
@ -1,8 +0,0 @@
|
|||
all:
|
||||
make -C src all
|
||||
|
||||
install:
|
||||
make -C src install
|
||||
|
||||
clean:
|
||||
make -C src clean
|
9
wmmisc/Makefile.am
Normal file
9
wmmisc/Makefile.am
Normal file
|
@ -0,0 +1,9 @@
|
|||
bin_PROGRAMS = wmmisc
|
||||
wmmisc_SOURCES = src/dockapp_draw.c src/dockapp_draw.h \
|
||||
src/dockapp_main.c src/dockapp_main.h \
|
||||
src/dockapp_utils.c src/dockapp_utils.h \
|
||||
src/wmgeneral.c src/wmgeneral.h \
|
||||
src/wmmisc-master.xpm
|
||||
|
||||
AM_CFLAGS = $(X11_CFLAGS) $(XEXT_CFLAGS) $(XPM_CFLAGS)
|
||||
LIBS += $(X11_LIBS) $(XEXT_LIBS) $(XPM_LIBS)
|
12
wmmisc/configure.ac
Normal file
12
wmmisc/configure.ac
Normal file
|
@ -0,0 +1,12 @@
|
|||
AC_INIT([wmmisc], [1.1], [wmaker-dev@googlegroups.com])
|
||||
AM_INIT_AUTOMAKE([foreign subdir-objects])
|
||||
AC_CONFIG_SRCDIR([configure.ac])
|
||||
AC_PROG_CC
|
||||
AC_SEARCH_LIBS([nearbyintf], [m], [], [
|
||||
AC_MSG_ERROR([unable to find the nearbyintf() function])
|
||||
])
|
||||
PKG_CHECK_MODULES([X11], [x11])
|
||||
PKG_CHECK_MODULES([XEXT], [xext])
|
||||
PKG_CHECK_MODULES([XPM], [xpm])
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_OUTPUT
|
|
@ -1,51 +0,0 @@
|
|||
include general.mk
|
||||
|
||||
#CPPFLAGS += -DUSE_MTRACE
|
||||
|
||||
objects = wmgeneral.o \
|
||||
dockapp_draw.o \
|
||||
dockapp_utils.o \
|
||||
dockapp_main.o
|
||||
|
||||
headers = wmgeneral.h \
|
||||
dockapp_draw.h \
|
||||
dockapp_utils.h \
|
||||
dockapp_main.h
|
||||
|
||||
sources = wmgeneral.c \
|
||||
dockapp_draw.c \
|
||||
dockapp_utils.c \
|
||||
dockapp_main.c
|
||||
|
||||
package = wmmisc
|
||||
|
||||
all: $(package)
|
||||
|
||||
$(package): $(objects)
|
||||
rm -f $(package)
|
||||
$(CC) $(CFLAGS) -o $(package) $(objects) $(LDFLAGS)
|
||||
|
||||
wmgeneral.o: wmgeneral.c wmgeneral.h
|
||||
rm -f wmgeneral.o
|
||||
$(CC) $(CPPFLAGS) $(INCLUDES) $(CFLAGS) -c -o wmgeneral.o wmgeneral.c
|
||||
|
||||
dockapp_draw.o: dockapp_draw.c wmgeneral.h dockapp_draw.h
|
||||
rm -f dockapp_draw.o
|
||||
$(CC) $(CPPFLAGS) $(INCLUDES) $(CFLAGS) -c -o dockapp_draw.o dockapp_draw.c
|
||||
|
||||
dockapp_utils.o: dockapp_utils.c wmgeneral.h dockapp_draw.h dockapp_utils.h
|
||||
rm -f dockapp_utils.o
|
||||
$(CC) $(CPPFLAGS) $(INCLUDES) $(CFLAGS) -c -o dockapp_utils.o dockapp_utils.c
|
||||
|
||||
dockapp_main.o: dockapp_main.c wmgeneral.h dockapp_draw.h dockapp_utils.h dockapp_main.h
|
||||
rm -f dockapp_main.o
|
||||
$(CC) $(CPPFLAGS) $(INCLUDES) $(CFLAGS) -c -o dockapp_main.o dockapp_main.c
|
||||
|
||||
install:
|
||||
install -c -s -o root -g root -m 755 $(package) $(BINDIR)
|
||||
|
||||
uninstall:
|
||||
rm -f $(BINDIR)/$(package)
|
||||
|
||||
clean:
|
||||
rm -f $(package) $(objects) *~ core core.* gmon.out
|
|
@ -1,70 +0,0 @@
|
|||
#########################################################
|
||||
# This is included in a Makefile.
|
||||
#
|
||||
# e.g.:
|
||||
# include general.mk
|
||||
#########################################################
|
||||
|
||||
ifeq ($(MODULAR_X),1)
|
||||
PREFIX = $(shell pkg-config --variable=prefix xorg-server)
|
||||
else
|
||||
PREFIX = /usr/X11R6
|
||||
endif
|
||||
BINDIR = $(PREFIX)/bin
|
||||
LIBDIR = $(PREFIX)/lib
|
||||
INCDIR = $(PREFIX)/include
|
||||
MANDIR = $(PREFIX)/share/man
|
||||
# Set some destination locations.
|
||||
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
# Set the compilers.
|
||||
|
||||
#CFLAGS = -O2
|
||||
#CXXFLAGS = $(CFLAGS)
|
||||
# Safe for all systems.
|
||||
|
||||
ifeq ($(CFLAGS),)
|
||||
CFLAGS = -march=pentium3 -O2 -fomit-frame-pointer -pipe
|
||||
CXXFLAGS = $(CFLAGS)
|
||||
endif
|
||||
# This is what I use on my box (Intel Celeron (Coppermine) 800MHz).
|
||||
|
||||
ifeq ($(FASTER_MATH),1)
|
||||
CFLAGS += -mfpmath=sse -ffast-math
|
||||
endif
|
||||
|
||||
CFLAGS += -std=c99
|
||||
CFLAGS += -Wall -W
|
||||
CXXFLAGS += -std=c99
|
||||
CXXFLAGS += -Wall -W
|
||||
# Set the compiler flags.
|
||||
|
||||
AS = as
|
||||
ASFLAGS =
|
||||
# Set the assembler and flags.
|
||||
|
||||
LD = ld
|
||||
LDFLAGS = -lm
|
||||
ifeq ($(MODULAR_X),1)
|
||||
LDFLAGS += $(shell pkg-config --libs x11 xpm xext)
|
||||
else
|
||||
LDFLAGS += -L/usr/X11R6/lib -lX11 -lXpm -lXext
|
||||
endif
|
||||
LDFLAGS += -Wl,-O1
|
||||
# Set the linker and flags.
|
||||
|
||||
AR = ar
|
||||
ARFLAGS = cruv
|
||||
RANLIB = ranlib
|
||||
|
||||
CPPFLAGS = -D_GNU_SOURCE
|
||||
# Set the preprocessor flags.
|
||||
|
||||
ifeq ($(MODULAR_X),1)
|
||||
INCLUDES = $(shell pkg-config --cflags x11 xpm xext)
|
||||
else
|
||||
INCLUDES = -I/usr/X11R6/include
|
||||
endif
|
||||
INCLUDES += -I.
|
||||
# Set the include locations.
|
Loading…
Reference in a new issue