From b997a67dc91f651997da070b7573754b442fa232 Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Fri, 12 Aug 2016 08:43:44 +1000 Subject: [PATCH] Support for Mac OS X --- Makefile.osx | 18 ++++++++++++++++++ doors.c | 2 +- main.c | 2 +- 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 Makefile.osx diff --git a/Makefile.osx b/Makefile.osx new file mode 100644 index 0000000..08dcefa --- /dev/null +++ b/Makefile.osx @@ -0,0 +1,18 @@ +CC=cc +CFLAGS=-I/opt/local/include +DEPS = bbs.h +JAMLIB = jamlib/jamlib.a +ZMODEM = Xmodem/libzmodem.a +LUA = lua/liblua.a + +OBJ = inih/ini.o bbs.o main.o users.o main_menu.o mail_menu.o doors.o bbs_list.o chat_system.o email.o files.o settings.o lua_glue.o +%.o: %.c $(DEPS) + $(CC) -c -o $@ $< $(CFLAGS) + +magicka: $(OBJ) + $(CC) -o magicka -o $@ $^ $(CFLAGS) -L/opt/local/lib -lsqlite3 $(JAMLIB) $(ZMODEM) $(LUA) -lutil -lm -ldl -lssl -lcrypto -lssh + +.PHONY: clean + +clean: + rm -f $(OBJ) magicka diff --git a/doors.c b/doors.c index 33e4e2a..20ecc96 100644 --- a/doors.c +++ b/doors.c @@ -10,7 +10,7 @@ #include #if defined(linux) # include -#elif defined(__OpenBSD__) || defined(__NetBSD__) +#elif defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__) # include #else # include diff --git a/main.c b/main.c index 2da67ce..c9bfb2d 100644 --- a/main.c +++ b/main.c @@ -17,7 +17,7 @@ #include #if defined(linux) # include -#elif defined(__OpenBSD__) || defined(__NetBSD__) +#elif defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__) # include #else # include