Windows porting
closes #23
#
CFLAGS = -O3 -Wall
-LDFLAGS = -s
-LDLIBS = -lncursesw
-OBJECTS = cstring.o cstack.o markdown.o parser.o viewer.o mdp.o
-DESTDIR ?= /usr/bin
ifeq ($(DEBUG),1)
-CFLAGS := -Wall -g -O0
+CFLAGS := -O0 -Wall -g
LDFLAGS :=
endif
+ifeq (Windows_NT, $(OS))
+CURSES = pdcurses
+CFLAGS += -DWIN32=1
+else
+CURSES = ncursesw
+endif
+
+LDFLAGS = -s
+LDLIBS = -l$(CURSES)
+OBJECTS = cstring.o cstack.o markdown.o parser.o viewer.o mdp.o
+DESTDIR = /usr/bin
+
all: mdp
mdp: $(OBJECTS)
*
*/
-#include <ncurses.h>
+#if WIN32 == 1
+# include <curses.h>
+#else
+# include <ncurses.h>
+#endif
#include "parser.h"
#include "cstack.h"
*/
#include <locale.h> // setlocale
-#include <ncurses.h>
#include <stdlib.h>
#include <string.h> // strchr
#include <unistd.h>