3 # Objectfiles, needed for $(TARGET)
4 #OBJ = main.o utilities.o callbacks.o
5 OBJ
= $(patsubst %.c
, %.o
, $(wildcard *.c
))
9 # Used libraries to get needed CFLAGS and LDFLAGS form pkg-config
10 LIBS
= gtk
+-2.0 webkit-1.0 libsoup-2.4
11 # Files to removo by clean target
12 CLEAN
= $(TARGET
) $(OBJ
) $(DEPS
) javascript.h
13 # Files to install by install target or remove by uninstall target
14 MANINSTALL
= $(addprefix $(MANDIR
)/man1
/,$(MAN1
)) \
15 $(addprefix $(MANDIR
)/man5
/,$(MAN5
))
16 INSTALL
= $(BINDIR
)/$(TARGET
) $(MANINSTALL
)
18 # DEBUG build? Off by default
21 CFLAGS
+= `pkg-config --cflags $(LIBS)` -D_XOPEN_SOURCE
=500
22 LDFLAGS
+= `pkg-config --libs $(LIBS)` -lX11
-lXext
24 # TA: This is a pretty stringent list of warnings to bail on!
26 CFLAGS
+= -g
-ggdb
-ansi
-Wstrict-prototypes
27 CFLAGS
+= -Wno-long-long
-Wall
-Wmissing-declarations
31 BINDIR ?
= $(PREFIX
)/bin
32 MANDIR ?
= $(PREFIX
)/share
/man
33 # Mode bits for normal not executable files
35 # Mode bits for directories
37 # Mode bits for executables
39 # Destination directory to install files
42 # auto garerated dependancies for object files
50 javascript.h
: hinting.js
51 perl .
/js-merge-helper.pl
54 $(CC
) $^
$(LDFLAGS
) -o
$@
56 .PHONY
: clean install uninstall
59 install: $(addprefix $(DESTDIR
)/,$(INSTALL
))
61 rm -f
$(addprefix $(DESTDIR
)/,$(INSTALL
))
63 # pattern rule to inslall executabels
64 $(DESTDIR
)/$(BINDIR
)/%: .
/%
65 -[ -e
'$(@D)' ] || mkdir
-p
'$(@D)' && chmod
$(DMOD
) '$(@D)'
70 # pattern rules to install manpages
71 $(DESTDIR
)/$(MANDIR
)/man1
/%: .
/%
72 -[ -e
'$(@D)' ] || mkdir
-p
'$(@D)' && chmod
$(DMOD
) '$(@D)'
76 $(DESTDIR
)/$(MANDIR
)/man5
/%: .
/%
77 -[ -e
'$(@D)' ] || mkdir
-p
'$(@D)' && chmod
$(DMOD
) '$(@D)'
82 $(CC
) -MMD
-c
$(CFLAGS
) $< -o
$@