commit 0e0c790d8b21c66eb28305df0bc987d8595281eb
parent a99b5408e98b7672a710f90c73fd9abe197c1f80
Author: sin <sin@2f30.org>
Date: Sun, 2 Nov 2014 13:59:29 +0000
Add configure
Diffstat:
4 files changed, 24 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
@@ -1,8 +1,4 @@
-PREFIX = /usr/local
-MANPREFIX = $(PREFIX)/man
-
-CFLAGS = -I/usr/X11R6/include
-LDLIBS = -L/usr/X11R6/lib -lX11 # -lbsd
+include config.mk
OBJ = xbattmon.o
BIN = xbattmon
diff --git a/config.bsd b/config.bsd
@@ -0,0 +1,5 @@
+PREFIX = /usr/local
+MANPREFIX = $(PREFIX)/man
+
+CFLAGS = -I/usr/X11R6/include
+LDLIBS = -L/usr/X11R6/lib -lX11
diff --git a/config.linux b/config.linux
@@ -0,0 +1,5 @@
+PREFIX = /usr/local
+MANPREFIX = $(PREFIX)/man
+
+CFLAGS =
+LDLIBS = -lX11 -lbsd
diff --git a/configure b/configure
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+case `uname` in
+OpenBSD)
+ ln -s config.bsd config.mk
+ ;;
+Linux)
+ ln -s config.linux config.mk
+ ;;
+*)
+ echo Unsupported system 1>&2
+ ;;
+esac