about summary refs log tree commit diff stats
path: root/freebsd/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/Makefile')
-rw-r--r--freebsd/Makefile40
1 files changed, 40 insertions, 0 deletions
diff --git a/freebsd/Makefile b/freebsd/Makefile
new file mode 100644
index 0000000..bf5ff4e
--- /dev/null
+++ b/freebsd/Makefile
@@ -0,0 +1,40 @@
+# $xxxterm$
+
+LIBS= gtk+-2.0 webkit-1.0 libsoup-2.4
+
+LDADD= -llibutil
+GTK_CFLAGS!= pkg-config --cflags $(LIBS)
+GTK_LDFLAGS!= pkg-config --libs $(LIBS)
+CFLAGS+= $(GTK_CFLAGS) -Wall -pthread
+LDFLAGS+= $(GTK_LDFLAGS) -pthread
+
+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: ../xxxterm.o freebsd.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
+	rm -f javascript.h
+
+.PHONY: all install clean