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