blob: 2f7b422b5ac4412e25b08016f54ae50f49435161 (
plain)
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
REAL_NAME=dwb
REAL_VERSION=0.0.18
COPYRIGHT="© 2011 portix"
DISTDIR=$(REAL_NAME)-$(REAL_VERSION)
DOCDIR=doc
SRCDIR=src
JSDIR=scripts
EXAMPLEDIR=examples
LIBDIR=lib
SHAREDIR=share
# VARIOUS FILES
PLUGIN_FILE=pluginblocker.asc
HG_VERSION=$(shell hg id -n 2>/dev/null)
VERSION=$(shell if [ $(HG_VERSION) ]; then echo "rev.\ $(HG_VERSION)"; else echo "$(REAL_VERSION)"; fi)
NAME=$(shell if [ $(HG_VERSION) ]; then echo "$(REAL_NAME)-hg"; else echo "$(REAL_NAME)"; fi)
##ifeq (${GTK}, 3)
##LIBS += gtk+-3.0
##LIBS += webkitgtk-3.0
##else
##LIBS += gtk+-2.0
##LIBS += webkit-1.0
##endif
ifeq (${GTK}, 3)
LIBS += gtk+-3.0
LIBS += webkitgtk-3.0
CFLAGS+=-DGTK_DISABLE_SINGLE_INCLUDES
CFLAGS+=-DGTK_DISABLE_DEPRECATED
CFLAGS+=-DGDK_DISABLE_DEPRECATED
CFLAGS+=-DGSEAL_ENABLE
else
LIBS += gtk+-2.0
LIBS += webkit-1.0
endif
#LIBS += json-glib-1.0
INFO_FILE=info.html
SETTINGS_FILE=settings.html
HEAD_FILE=head.html
KEY_FILE=keys.html
ERROR_FILE=error.html
#FLAGS += -pedantic
CFLAGS += -Wall
CFLAGS += -pipe
CFLAGS += $(shell pkg-config --cflags $(LIBS))
CFLAGS += --ansi
CFLAGS += -std=c99
CFLAGS += -D_POSIX_SOURCE
CFLAGS += -D_BSD_SOURCE
CFLAGS += -DNAME=\"$(NAME)\"
CFLAGS += -DVERSION=\"$(VERSION)\"
CFLAGS += -DCOPYRIGHT=\"$(COPYRIGHT)\"
CFLAGS += -DREAL_NAME=\"$(REAL_NAME)\"
CFLAGS += -DPLUGIN_FILE=\"$(PLUGIN_FILE)\"
CFLAGS += -DINFO_FILE=\"$(INFO_FILE)\"
CFLAGS += -DSETTINGS_FILE=\"$(SETTINGS_FILE)\"
CFLAGS += -DHEAD_FILE=\"$(HEAD_FILE)\"
CFLAGS += -DKEY_FILE=\"$(KEY_FILE)\"
CFLAGS += -DERROR_FILE=\"$(ERROR_FILE)\"
LDFLAGS =$(shell pkg-config --libs $(LIBS))
DCFLAGS = $(CFLAGS)
DCFLAGS += -DDWB_DEBUG
DCFLAGS += -g
OBJ = $(patsubst %.c, %.o, $(wildcard *.c))
DOBJ = $(patsubst %.c, %.do, $(wildcard *.c))
SOURCE = $(wildcard $(SRCDIR)/*.c)
HDR = $(SOURCE:%.c=%.h)
TARGET = $(REAL_NAME)
DTARGET=$(TARGET)_d
EXAMPLES += $(EXAMPLEDIR)/ext_editor.sh
EXAMPLES += $(EXAMPLEDIR)/formfiller.sh
MANFILE=$(REAL_NAME).1
MAKE=make --no-print-directory
BUILDDATE=`date +%Y.%m.%d`
#directories
PREFIX=/usr
BINDIR=$(PREFIX)/bin
DATAROOTDIR=$(PREFIX)/share
DATADIR=$(DATAROOTDIR)
MANDIR=$(DATAROOTDIR)/man
MAN1DIR=$(MANDIR)/man1
|