about summary refs log tree commit diff stats
path: root/linux/Makefile
blob: 697dc75aab6b610c9c959a3cd59dd2945e9fda7b (plain) (blame)
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
LIBS= gtk+-2.0 webkit-1.0 libsoup-2.4 gnutls gthread-2.0

CFLAGS+= -O2 -Wall -ggdb3 -D_GNU_SOURCE -I. $(shell pkg-config --cflags $(LIBS))
LDADD+= $(shell pkg-config --libs $(LIBS)) -lbsd -ldl -lgcrypt

PREFIX?= /usr/local
BINDIR?= $(PREFIX)/bin
LIBDIR?= $(PREFIX)/lib
MANDIR?= $(PREFIX)/share/man

CC?= gcc

all: javascript.h xxxterm

javascript.h: ../js-merge-helper.pl ../hinting.js
	perl ../js-merge-helper.pl ../hinting.js ../input-focus.js > \
	javascript.h

xxxterm.o: javascript.h

xxxterm: ../marco.o ../about.o ../inspector.o ../xxxterm.o linux.o
	$(CC) $(LDFLAGS) -o $@ $+ $(LDADD)

install: all
	install -m 755 -d $(DESTDIR)$(BINDIR)
	install -m 755 -d $(DESTDIR)$(LIBDIR)
	install -m 755 -d $(DESTDIR)$(MANDIR)/man1
	install -m 755 xxxterm $(DESTDIR)$(BINDIR)
	install -m 644 ../xxxterm.1 $(DESTDIR)$(MANDIR)/man1/xxxterm.1

clean:
	rm -f xxxterm *.o ../*.o
	rm -f javascript.h

.PHONY: all install clean