Ported to Minix 3.3.0

This commit is contained in:
Andrew Pamment 2016-08-01 10:36:53 +00:00
parent b0ee7b0ea5
commit c7046a66f3
3 changed files with 51 additions and 1 deletions

18
Makefile.minix Normal file
View File

@ -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

29
jamlib/Makefile.minix Normal file
View File

@ -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

View File

@ -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"