2 PKG_CONFIG ?
= pkg-config
6 DATADIR
= $(PREFIX
)/share
/wmcliphist
7 MAN1DIR
= $(PREFIX
)/share
/man
/man1
8 INCLUDES
= `$(PKG_CONFIG) --cflags gtk+-3.0 x11`
11 CFLAGS
+= -Wall
-ansi
-pedantic
$(INCLUDES
) -DDATADIR
=\"$(DATADIR
)\"
14 # for debuggind purposes
15 # ISO doesn't support macros with variable number of arguments so -pedantic
17 #CFLAGS += -Wall -g -ansi $(INCLUDES) -DFNCALL_DEBUG -DDATADIR=\"$(DATADIR)\"
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
)
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
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
54 rm -rf
$(OBJECTS
) $(TARGET
)
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
)