2014-11-23 02:48:45 +00:00
|
|
|
srcCC ?= gcc
|
|
|
|
INSTALL = install
|
2014-11-23 02:48:37 +00:00
|
|
|
PREFIX = /usr/local
|
2014-11-23 02:48:45 +00:00
|
|
|
BINDIR = $(PREFIX)/bin
|
|
|
|
DATADIR = $(PREFIX)/share/wmcliphist
|
2014-11-23 02:48:41 +00:00
|
|
|
INCLUDES = `pkg-config --cflags gtk+-2.0 x11`
|
2014-11-23 02:48:37 +00:00
|
|
|
|
|
|
|
# for normal use
|
2014-11-23 02:48:45 +00:00
|
|
|
CFLAGS += -Wall -ansi -pedantic $(INCLUDES) -DDATADIR=\"$(DATADIR)\"
|
2014-11-23 02:48:42 +00:00
|
|
|
DEBUG =
|
2014-11-23 02:48:37 +00:00
|
|
|
|
|
|
|
# for debuggind purposes
|
|
|
|
# ISO doesn't support macros with variable number of arguments so -pedantic
|
|
|
|
# must not be used
|
|
|
|
#CFLAGS += -Wall -g -ansi $(INCLUDES) -DFNCALL_DEBUG
|
|
|
|
#DEBUG = debug.o
|
|
|
|
|
2014-11-23 02:48:38 +00:00
|
|
|
LIBS = `pkg-config --libs gtk+-2.0 x11`
|
2014-11-23 02:48:37 +00:00
|
|
|
|
|
|
|
OBJECTS = wmcliphist.o clipboard.o gui.o rcconfig.o history.o hotkeys.o utils.o $(DEBUG)
|
|
|
|
TARGET = wmcliphist
|
2014-11-23 02:48:45 +00:00
|
|
|
ICONS = icon/ico_16x16.png icon/ico_30x30_black.png icon/ico_30x30_gray.png \
|
|
|
|
icon/ico_30x30_white.png icon/ico_40x40_black.png \
|
|
|
|
icon/ico_40x40_gray.png icon/ico_40x40_white.png \
|
|
|
|
icon/ico_60x60_black.png icon/ico_60x60_gray.png \
|
|
|
|
icon/ico_60x60_white.png
|
|
|
|
|
2014-11-23 02:48:37 +00:00
|
|
|
|
|
|
|
all: $(TARGET)
|
|
|
|
|
|
|
|
lclint:
|
|
|
|
lclint $(INCLUDES) +posixlib *.c >lclint.log
|
|
|
|
|
2014-11-23 02:48:43 +00:00
|
|
|
wmcliphist: $(OBJECTS)
|
|
|
|
$(CC) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $@
|
2014-11-23 02:48:37 +00:00
|
|
|
|
|
|
|
wmcliphist.o: wmcliphist.c wmcliphist.h \
|
2014-11-23 02:48:45 +00:00
|
|
|
icon/ico_60x60_mask.xbm icon/ico_40x40_mask.xbm \
|
|
|
|
icon/ico_30x30_mask.xbm icon/ico_16x16_mask.xbm
|
2014-11-23 02:48:37 +00:00
|
|
|
|
|
|
|
clipboard.o: clipboard.c wmcliphist.h
|
|
|
|
|
|
|
|
rcconfig.o: rcconfig.c wmcliphist.h
|
|
|
|
|
|
|
|
gui.o: gui.c wmcliphist.h
|
|
|
|
|
|
|
|
history.o: history.c wmcliphist.h
|
|
|
|
|
|
|
|
hotkeys.o: hotkeys.c wmcliphist.h
|
|
|
|
|
|
|
|
utils.o: utils.c wmcliphist.h
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf $(OBJECTS) $(TARGET)
|
|
|
|
rm -rf core
|
|
|
|
|
|
|
|
install:
|
2014-11-23 02:48:45 +00:00
|
|
|
$(INSTALL) -d $(DESTDIR)$(DATADIR)
|
|
|
|
$(INSTALL) -m 644 $(ICONS) $(DESTDIR)$(DATADIR)
|
|
|
|
$(INSTALL) -d $(DESTDIR)$(BINDIR)
|
|
|
|
$(INSTALL) $(TARGET) $(DESTDIR)$(BINDIR)
|