blob: 2a7439153643ef1ca6b577b4e4318f9f06c16a44 (
plain) (
tree)
|
|
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
SRCS= $(shell ls ../*.c)
SRCS+= linux.c
OBJS= $(SRCS:.c=.o)
DEPS= $(addsuffix .depend, $(OBJS))
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: $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+ $(LDADD)
%.o: %.c
@echo "Generating $@.depend"
@$(CC) -MM $(CPPFLAGS) $(CFLAGS) $< | \
sed 's,^.*\.o[ :]*,$@ $@.depend : ,g' > $@.depend
$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $<
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 $(OBJS) $(DEPS)
rm -f javascript.h
-include $(DEPS)
.PHONY: all install clean
|