aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Aurélien Aptel <aurelien.aptel@gmail.com>2010-08-30 13:04:19 +0200
committerGravatar Aurélien Aptel <aurelien.aptel@gmail.com>2010-08-30 13:04:19 +0200
commitae5baac932af877cb18df6853d45f033ed9b270f (patch)
treec7323028d822461af56c82442ff894668f8103b1
parentbef87acd0d0e22ba4689be6f1c39ce2d90812317 (diff)
use predefined OS macro instead of uname.
-rw-r--r--Makefile1
-rw-r--r--config.mk9
-rw-r--r--st.c6
3 files changed, 4 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index ef3bf09..2fb13ae 100644
--- a/Makefile
+++ b/Makefile
@@ -10,7 +10,6 @@ all: options st
options:
@echo st build options:
- @echo "SYSTEM = ${SYSTEM}"
@echo "CFLAGS = ${CFLAGS}"
@echo "LDFLAGS = ${LDFLAGS}"
@echo "CC = ${CC}"
diff --git a/config.mk b/config.mk
index f0c7e2e..46efc0c 100644
--- a/config.mk
+++ b/config.mk
@@ -14,15 +14,8 @@ X11LIB = /usr/X11R6/lib
INCS = -I. -I/usr/include -I${X11INC}
LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 -lutil
-# uncomment manualy your system if compilation fail
-SYSTEM = -D`uname | tr a-z A-Z`
-#SYSTEM = -DLINUX
-#SYSTEM = -DOPENBSD
-#SYSTEM = -DFREEBSD
-#SYSTEM = -DNETBSD
-
# flags
-CPPFLAGS = -DVERSION=\"${VERSION}\" ${SYSTEM}
+CPPFLAGS = -DVERSION=\"${VERSION}\"
CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
LDFLAGS = -s ${LIBS}
diff --git a/st.c b/st.c
index af3ec6d..f42797f 100644
--- a/st.c
+++ b/st.c
@@ -20,11 +20,11 @@
#include <X11/keysym.h>
#include <X11/Xutil.h>
-#if defined(LINUX)
+#if defined(__linux)
#include <pty.h>
-#elif defined(OPENBSD) || defined(NETBSD)
+#elif defined(__OpenBSD__) || defined(__NetBSD__)
#include <util.h>
-#elif defined(FREEBSD)
+#elif defined(__FreeBSD__) || defined(__DragonFly__)
#include <libutil.h>
#endif