Browse Source

use predefined OS macro instead of uname.

master
Aurélien Aptel 14 years ago
parent
commit
ae5baac932
3 changed files with 4 additions and 12 deletions
  1. +0
    -1
      Makefile
  2. +1
    -8
      config.mk
  3. +3
    -3
      st.c

+ 0
- 1
Makefile View File

@ -10,7 +10,6 @@ all: options st
options:
@echo st build options:
@echo "SYSTEM = ${SYSTEM}"
@echo "CFLAGS = ${CFLAGS}"
@echo "LDFLAGS = ${LDFLAGS}"
@echo "CC = ${CC}"


+ 1
- 8
config.mk View File

@ -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}


+ 3
- 3
st.c View File

@ -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


Loading…
Cancel
Save