From c7046a66f3bf9eedf2a214d1179dcc6356fd58e9 Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Mon, 1 Aug 2016 10:36:53 +0000 Subject: [PATCH] Ported to Minix 3.3.0 --- Makefile.minix | 18 ++++++++++++++++++ jamlib/Makefile.minix | 29 +++++++++++++++++++++++++++++ lua/Makefile | 5 ++++- 3 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 Makefile.minix create mode 100644 jamlib/Makefile.minix diff --git a/Makefile.minix b/Makefile.minix new file mode 100644 index 0000000..1cf8b03 --- /dev/null +++ b/Makefile.minix @@ -0,0 +1,18 @@ +CC=clang +CFLAGS=-I/usr/pkg/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/usr/pkg/lib -lsqlite3 $(JAMLIB) $(ZMODEM) $(LUA) -lutil -lm + +.PHONY: clean + +clean: + rm -f $(OBJ) magicka diff --git a/jamlib/Makefile.minix b/jamlib/Makefile.minix new file mode 100644 index 0000000..7959c4c --- /dev/null +++ b/jamlib/Makefile.minix @@ -0,0 +1,29 @@ +CC = clang $(CPPFLAGS) $(CFLAGS) -D__LINUX__ $(LDFLAGS) -Wall +AR = ar -ru +RM = rm -f + +OBJS = crc32.o mbase.o message.o lastread.o subpack.o structrw.o + +jamlib.a : $(OBJS) + $(AR) jamlib.a $(OBJS) + +crc32.o: crc32.c jam.h + $(CC) -c crc32.c -o crc32.o + +mbase.o: mbase.c jam.h + $(CC) -c mbase.c -o mbase.o + +message.o: message.c jam.h + $(CC) -c message.c -o message.o + +lastread.o: lastread.c jam.h + $(CC) -c lastread.c -o lastread.o + +subpack.o: subpack.c jam.h + $(CC) -c subpack.c -o subpack.o + +structrw.o: structrw.c jam.h + $(CC) -c structrw.c -o structrw.o + +clean: + $(RM) *.o *.a diff --git a/lua/Makefile b/lua/Makefile index d71c75c..2715483 100644 --- a/lua/Makefile +++ b/lua/Makefile @@ -26,7 +26,7 @@ MYOBJS= # == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE ======= -PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris +PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris minix LUA_A= liblua.a CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o \ @@ -101,6 +101,9 @@ c89: @echo '' +minix: + $(MAKE) $(ALL) CC="clang" SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-L/usr/pkg/lib -Wl,-E -lreadline" + freebsd: $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -lreadline"