-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
47 lines (34 loc) · 1.05 KB
/
Makefile
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
LIBS= `pkg-config --libs glib-2.0 gtk+-3.0 libmenu-cache`
CFLAGS+= -g -Wall `pkg-config --cflags glib-2.0 gtk+-3.0 libmenu-cache`
CC=gcc
#-DG_DISABLE_DEPRECATED
# Comment this line if you don't want icons to appear in menu
CFLAGS+=-DWITH_ICONS
# Uncomment this line if Openbox can display SVG icons
# Check SVG support with '$ ldd /usr/bin/openbox | grep svg', librsvg must appear..
# CFLAGS+=-DWITH_SVG
prefix= /usr/local
DESTDIR ?= $(prefix)
BINDIR= ${DESTDIR}/bin
SRC= $(shell ls src/*.c 2> /dev/null)
OBJ= $(SRC:.c=.o)
all: $(OBJ) check openbox-menu
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
openbox-menu: $(OBJ)
$(CC) $(OBJ) -o openbox-menu $(LDFLAGS) $(LIBS)
.PHONY: clean install doc changelog check xmllint
clean:
@rm -f $(OBJ) $(TEST_OBJ) openbox-menu check
@rm -rf doc
install:
@strip -s openbox-menu
@install -Dm 755 openbox-menu $(BINDIR)/openbox-menu
doc:
robodoc --src . --doc doc/ --multidoc --index --html --cmode
xmllint: openbox-menu
./openbox-menu > test.xml
xmllint test.xml
rm test.xml
changelog:
@hg log --style changelog > ChangeLog