1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
|
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# #
# Change these values to customize your installation and build process #
# #
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Change this PREFIX to where you want docker to be installed
PREFIX=/usr/local
# Change this XLIBPATH to point to your X11 development package's installation
XLIBPATH=/usr/X11R6/lib
# Sets some flags for stricter compiling
CFLAGS += -pedantic -Wall
CPPFLAGS ?=
LDFLAGS += -L$(XLIBPATH) -lX11
PKG_CONFIG ?= pkg-config
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# #
# Leave the rest of the Makefile alone if you want it to build! #
# #
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
PACKAGE=docker
VERSION=1.5
target=wmdocker
sources=docker.c kde.c icons.c xproperty.c net.c
headers=docker.h kde.h icons.h xproperty.h net.h version.h
extra=README COPYING version.h.in
all: $(target) $(sources) $(headers)
@echo Build Successful
$(target): $(sources:.c=.o)
$(CC) $(CPPFLAGS) $(CFLAGS) \
$^ -o $@ \
$(LDFLAGS) \
`$(PKG_CONFIG) --libs glib-2.0`
%.o: %.c
$(CC) -c $(CPPFLAGS) $(CFLAGS) `$(PKG_CONFIG) --cflags glib-2.0` $<
version.h: version.h.in Makefile
sed -e "s/@VERSION@/$(VERSION)/" version.h.in > $@
install: all
install $(target) $(PREFIX)/bin/$(target)
uninstall:
rm -f $(PREFIX)/$(target)
clean:
rm -rf .dist
rm -f core *.o .\#* *\~ $(target)
distclean: clean
rm -f version.h
rm -f $(PACKAGE)-*.tar.gz
dist: Makefile $(sources) $(headers) $(extra)
mkdir -p .dist/$(PACKAGE)-$(VERSION) && \
cp $^ .dist/$(PACKAGE)-$(VERSION) && \
tar -c -z -C .dist -f \
$(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION) && \
rm -rf .dist
love: $(sources)
touch $^
# local dependancies
docker.o: docker.c version.h kde.h icons.h docker.h net.h
icons.o: icons.c icons.h docker.h
kde.o: kde.c kde.h docker.h xproperty.h
net.o: net.c net.h docker.h icons.h
xproperty.o: xproperty.c xproperty.h docker.h
|