wmclockmon: rename `DFLAGS` `debug_CFLAGS`
[dockapps.git] / wmcliphist / Makefile
blob7b3ac715d4c7834d1116e480a5b32265211b08fb
1 srcCC ?= gcc
2 PKG_CONFIG ?= pkg-config
3 INSTALL = install
4 PREFIX = /usr/local
5 BINDIR = $(PREFIX)/bin
6 DATADIR = $(PREFIX)/share/wmcliphist
7 MAN1DIR = $(PREFIX)/share/man/man1
8 INCLUDES = `$(PKG_CONFIG) --cflags gtk+-3.0 x11`
10 # for normal use
11 CFLAGS += -Wall -ansi -pedantic $(INCLUDES) -DDATADIR=\"$(DATADIR)\"
12 DEBUG =
14 # for debuggind purposes
15 # ISO doesn't support macros with variable number of arguments so -pedantic
16 # must not be used
17 #CFLAGS += -Wall -g -ansi $(INCLUDES) -DFNCALL_DEBUG -DDATADIR=\"$(DATADIR)\"
18 #DEBUG = debug.o
20 LIBS = `$(PKG_CONFIG) --libs gtk+-3.0 x11`
22 OBJECTS = wmcliphist.o clipboard.o gui.o rcconfig.o history.o hotkeys.o utils.o $(DEBUG)
23 TARGET = wmcliphist
24 ICONS = icon/ico_16x16.png icon/ico_30x30_black.png icon/ico_30x30_gray.png \
25 icon/ico_30x30_white.png icon/ico_40x40_black.png \
26 icon/ico_40x40_gray.png icon/ico_40x40_white.png \
27 icon/ico_60x60_black.png icon/ico_60x60_gray.png \
28 icon/ico_60x60_white.png
31 all: $(TARGET)
33 lclint:
34 lclint $(INCLUDES) +posixlib *.c >lclint.log
36 wmcliphist: $(OBJECTS)
37 $(CC) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $@
39 wmcliphist.o: wmcliphist.c wmcliphist.h
41 clipboard.o: clipboard.c wmcliphist.h
43 rcconfig.o: rcconfig.c wmcliphist.h
45 gui.o: gui.c wmcliphist.h
47 history.o: history.c wmcliphist.h
49 hotkeys.o: hotkeys.c wmcliphist.h
51 utils.o: utils.c wmcliphist.h
53 clean:
54 rm -rf $(OBJECTS) $(TARGET)
55 rm -rf core
57 install:
58 $(INSTALL) -d $(DESTDIR)$(DATADIR)
59 $(INSTALL) -m 644 $(ICONS) $(DESTDIR)$(DATADIR)
60 $(INSTALL) -d $(DESTDIR)$(BINDIR)
61 $(INSTALL) $(TARGET) $(DESTDIR)$(BINDIR)
62 $(INSTALL) -d $(DESTDIR)$(MAN1DIR)
63 $(INSTALL) -m 644 wmcliphist.1 $(DESTDIR)$(MAN1DIR)