Commits

Anonymous committed 9389d6c

added -DLINUX and #if for pty.h vs util.h (thx Aled)

Comments (0)

Files changed (2)

 # srw version
-VERSION = 0.1
+VERSION = 0.2
 
 # Customize below to fit your system
 
 LIBS = -L/usr/lib -lc -lutil
 
 # flags
-CPPFLAGS = -DVERSION=\"${VERSION}\" -D_GNU_SOURCE
+# use for BSDs
+#CPPFLAGS = -DVERSION=\"${VERSION}\" -D_GNU_SOURCE
+CPPFLAGS = -DVERSION=\"${VERSION}\" -D_GNU_SOURCE -DLINUX
 CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
 LDFLAGS = -s ${LIBS}
 
-#include <sys/wait.h>
-#include <unistd.h>
 #include <err.h>
 #include <signal.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <termios.h>
+#include <unistd.h>
+
+#include <sys/ioctl.h>
 #include <sys/select.h>
-#include <stdio.h>
-#include <pty.h>
-#include <termios.h>
-#include <sys/ioctl.h>
+#include <sys/wait.h>
+
+#ifdef LINUX
+ #include <pty.h>
+#else  // LINUX
+ #include <util.h>
+#endif // LINUX
 
 #define STDIN  0
 #define STDOUT 1