3 # Objectfiles, needed for $(TARGET)
4 OBJ
= main.o utilities.o callbacks.o
8 # Used libraries to get needed CFLAGS and LDFLAGS form pkg-config
9 LIBS
= gtk
+-2.0 webkit-1.0 libsoup-2.4
10 # Files to removo by clean target
11 CLEAN
= $(TARGET
) $(OBJ
) $(DEPS
) javascript.h
12 # Files to install by install target or remove by uninstall target
13 MANINSTALL
= $(addprefix $(MANDIR
)/man1
/,$(MAN1
)) \
14 $(addprefix $(MANDIR
)/man5
/,$(MAN5
))
15 INSTALL
= $(BINDIR
)/$(TARGET
) $(MANINSTALL
)
17 # DEBUG build? Off by default
20 CFLAGS
+= `pkg-config --cflags $(LIBS)`
21 LDFLAGS
+= `pkg-config --libs $(LIBS)` -lX11
-lXext
23 # TA: This is a pretty stringent list of warnings to bail on!
25 CFLAGS
+= -g
-ggdb
-ansi
-Wstrict-prototypes
26 CFLAGS
+= -Wno-long-long
-Wall
-Wmissing-declarations
30 BINDIR ?
= $(PREFIX
)/bin
31 MANDIR ?
= $(PREFIX
)/share
/man
32 # Mode bits for normal not executable files
34 # Mode bits for directories
36 # Mode bits for executables
38 # Destination directory to install files
41 # auto garerated dependancies for object files
49 javascript.h
: hinting.js
50 perl .
/js-merge-helper.pl
53 $(CC
) $^
$(LDFLAGS
) -o
$@
55 .PHONY
: clean install uninstall
58 install: $(addprefix $(DESTDIR
)/,$(INSTALL
))
60 rm -f
$(addprefix $(DESTDIR
)/,$(INSTALL
))
62 # pattern rule to inslall executabels
63 $(DESTDIR
)/$(BINDIR
)/%: .
/%
64 -[ -e
'$(@D)' ] || mkdir
-p
'$(@D)' && chmod
$(DMOD
) '$(@D)'
69 # pattern rules to install manpages
70 $(DESTDIR
)/$(MANDIR
)/man1
/%: .
/%
71 -[ -e
'$(@D)' ] || mkdir
-p
'$(@D)' && chmod
$(DMOD
) '$(@D)'
75 $(DESTDIR
)/$(MANDIR
)/man5
/%: .
/%
76 -[ -e
'$(@D)' ] || mkdir
-p
'$(@D)' && chmod
$(DMOD
) '$(@D)'
81 $(CC
) -MMD
-c
$(CFLAGS
) $< -o
$@