From 7f5e567a2bf270cc501b7d1310accdacbfaf74b2 Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Sun, 19 Mar 2017 14:38:01 +1000 Subject: [PATCH] Update ticproc to new build system --- Makefile.freebsd | 8 ++++++-- Makefile.freebsd.WWW | 8 ++++++-- Makefile.linux | 8 ++++++-- Makefile.linux.WWW | 8 ++++++-- Makefile.netbsd | 7 +++++-- Makefile.netbsd.WWW | 6 +++++- Makefile.osx | 8 ++++++-- Makefile.osx.WWW | 6 +++++- utils/ticproc/Makefile | 23 +++++++++++++++++++---- utils/ticproc/ticproc.c | 2 +- 10 files changed, 65 insertions(+), 19 deletions(-) diff --git a/Makefile.freebsd b/Makefile.freebsd index 2660d7e..051560f 100644 --- a/Makefile.freebsd +++ b/Makefile.freebsd @@ -6,7 +6,7 @@ ZMODEM = deps/Xmodem/libzmodem.a LUA = deps/lua/liblua.a ODOORS = deps/odoors/libs-`uname -s`/libODoors.a -all: magicka magimail magiedit +all: magicka magimail magiedit ticproc ${LUA}: cd deps/lua && $(MAKE) -f Makefile freebsd MAKEFLAGS= @@ -33,6 +33,9 @@ magimail: $(JAMLIB) magiedit: $(ODOORS) cd utils/magiedit && $(MAKE) +ticproc: + cd utils/ticproc && $(MAKE) + .PHONY: clean clean: @@ -42,4 +45,5 @@ clean: cd deps/Xmodem && $(MAKE) clean cd utils/magimail && $(MAKE) cleanfreebsd cd utils/magiedit && $(MAKE) clean - cd deps/odoors/ && rm -rf libs-`uname -s` objs-`uname -s` exe-`uname -s` \ No newline at end of file + cd deps/odoors/ && rm -rf libs-`uname -s` objs-`uname -s` exe-`uname -s` + cd utils/ticproc && $(MAKE) clean \ No newline at end of file diff --git a/Makefile.freebsd.WWW b/Makefile.freebsd.WWW index eb3a525..dd27dcc 100644 --- a/Makefile.freebsd.WWW +++ b/Makefile.freebsd.WWW @@ -8,7 +8,7 @@ B64 = deps/libb64-1.2/src/libb64.a MICROHTTPD=-lmicrohttpd ODOORS = deps/odoors/libs-`uname -s`/libODoors.a -all: magicka magimail magiedit +all: magicka magimail magiedit ticproc ${LUA}: cd deps/lua && $(MAKE) -f Makefile freebsd MAKEFLAGS= @@ -38,6 +38,9 @@ magimail: $(JAMLIB) magiedit: $(ODOORS) cd utils/magiedit && $(MAKE) +ticproc: + cd utils/ticproc && $(MAKE) + .PHONY: clean clean: @@ -48,4 +51,5 @@ clean: cd deps/libb64-1.2 && $(MAKE) clean cd utils/magimail && $(MAKE) cleanfreebsd cd utils/magiedit && $(MAKE) clean - cd deps/odoors/ && rm -rf libs-`uname -s` objs-`uname -s` exe-`uname -s` \ No newline at end of file + cd deps/odoors/ && rm -rf libs-`uname -s` objs-`uname -s` exe-`uname -s` + cd utils/ticproc && $(MAKE) clean \ No newline at end of file diff --git a/Makefile.linux b/Makefile.linux index 7083c1c..1d974a6 100644 --- a/Makefile.linux +++ b/Makefile.linux @@ -6,7 +6,7 @@ ZMODEM = deps/Xmodem/libzmodem.a LUA = deps/lua/liblua.a ODOORS = deps/odoors/libs-`uname -s`/libODoors.a -all: magicka magimail magiedit +all: magicka magimail magiedit ticproc ${LUA}: cd deps/lua && $(MAKE) -f Makefile linux MAKEFLAGS= @@ -33,6 +33,9 @@ magimail: $(JAMLIB) magiedit: $(ODOORS) cd utils/magiedit && $(MAKE) +ticproc: + cd utils/ticproc && $(MAKE) + .PHONY: clean clean: @@ -42,4 +45,5 @@ clean: cd deps/Xmodem && $(MAKE) clean cd utils/magimail && $(MAKE) cleanlinux cd utils/magiedit && $(MAKE) clean - cd deps/odoors/ && rm -rf libs-`uname -s` objs-`uname -s` exe-`uname -s` \ No newline at end of file + cd deps/odoors/ && rm -rf libs-`uname -s` objs-`uname -s` exe-`uname -s` + cd utils/ticproc && $(MAKE) clean \ No newline at end of file diff --git a/Makefile.linux.WWW b/Makefile.linux.WWW index eb1b912..9949410 100644 --- a/Makefile.linux.WWW +++ b/Makefile.linux.WWW @@ -8,7 +8,7 @@ B64 = deps/libb64-1.2/src/libb64.a MICROHTTPD=-lmicrohttpd ODOORS = deps/odoors/libs-`uname -s`/libODoors.a -all: magicka magimail magiedit +all: magicka magimail magiedit ticproc ${LUA}: cd deps/lua && $(MAKE) -f Makefile linux MAKEFLAGS= @@ -38,6 +38,9 @@ magimail: $(JAMLIB) magiedit: $(ODOORS) cd utils/magiedit && $(MAKE) +ticproc: + cd utils/ticproc && $(MAKE) + .PHONY: clean clean: @@ -48,4 +51,5 @@ clean: cd deps/libb64-1.2 && $(MAKE) clean cd utils/magimail && $(MAKE) cleanlinux cd utils/magiedit && $(MAKE) clean - cd deps/odoors/ && rm -rf libs-`uname -s` objs-`uname -s` exe-`uname -s` \ No newline at end of file + cd deps/odoors/ && rm -rf libs-`uname -s` objs-`uname -s` exe-`uname -s` + cd utils/ticproc && $(MAKE) clean \ No newline at end of file diff --git a/Makefile.netbsd b/Makefile.netbsd index 7521db3..8c4fe15 100644 --- a/Makefile.netbsd +++ b/Makefile.netbsd @@ -6,7 +6,7 @@ ZMODEM = deps/Xmodem/libzmodem.a LUA = deps/lua/liblua.a ODOORS = deps/odoors/libs-`uname -s`/libODoors.a -all: magicka magimail magiedit +all: magicka magimail magiedit ticproc ${LUA}: cd deps/lua && $(MAKE) -f Makefile bsd MAKEFLAGS= @@ -33,6 +33,9 @@ magiedit: $(ODOORS) magimail: $(JAMLIB) cd utils/magimail && $(MAKE) freebsd +ticproc: + cd utils/ticproc && $(MAKE) + .PHONY: clean clean: @@ -43,4 +46,4 @@ clean: cd utils/magimail && $(MAKE) cleanfreebsd cd utils/magiedit && $(MAKE) clean cd deps/odoors/ && rm -rf libs-`uname -s` objs-`uname -s` exe-`uname -s` - + cd utils/ticproc && $(MAKE) clean diff --git a/Makefile.netbsd.WWW b/Makefile.netbsd.WWW index fdd41d7..dd43733 100644 --- a/Makefile.netbsd.WWW +++ b/Makefile.netbsd.WWW @@ -8,7 +8,7 @@ B64 = deps/libb64-1.2/src/libb64.a MICROHTTPD=-lmicrohttpd ODOORS = deps/odoors/libs-`uname -s`/libODoors.a -all: magicka magimail magiedit +all: magicka magimail magiedit ticproc ${LUA}: cd deps/lua && $(MAKE) -f Makefile bsd MAKEFLAGS= @@ -38,6 +38,9 @@ magiedit: $(ODOORS) magimail: $(JAMLIB) cd utils/magimail && $(MAKE) freebsd +ticproc: + cd utils/ticproc && $(MAKE) + .PHONY: clean clean: @@ -49,3 +52,4 @@ clean: cd utils/magimail && $(MAKE) cleanfreebsd cd utils/magiedit && $(MAKE) clean cd deps/odoors/ && rm -rf libs-`uname -s` objs-`uname -s` exe-`uname -s` + cd utils/ticproc && $(MAKE) clean \ No newline at end of file diff --git a/Makefile.osx b/Makefile.osx index b350eed..0c10989 100644 --- a/Makefile.osx +++ b/Makefile.osx @@ -8,7 +8,7 @@ ODOORS = deps/odoors/libs-`uname -s`/libODoors.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 strings.o bluewave.o hashmap/hashmap.o -all: magicka magimail magiedit +all: magicka magimail magiedit ticproc ${LUA}: cd deps/lua && $(MAKE) -f Makefile macosx MAKEFLAGS= @@ -34,6 +34,9 @@ magimail: $(JAMLIB) magiedit: $(ODOORS) cd utils/magiedit && $(MAKE) +ticproc: + cd utils/ticproc && $(MAKE) + .PHONY: clean clean: @@ -43,4 +46,5 @@ clean: cd deps/Xmodem && $(MAKE) clean cd utils/magimail && $(MAKE) cleanlinux cd utils/magiedit && $(MAKE) clean - cd deps/odoors/ && rm -rf libs-`uname -s` objs-`uname -s` exe-`uname -s` \ No newline at end of file + cd deps/odoors/ && rm -rf libs-`uname -s` objs-`uname -s` exe-`uname -s` + cd utils/ticproc && $(MAKE) clean \ No newline at end of file diff --git a/Makefile.osx.WWW b/Makefile.osx.WWW index 0aa2aa8..29c099d 100644 --- a/Makefile.osx.WWW +++ b/Makefile.osx.WWW @@ -8,7 +8,7 @@ B64 = deps/libb64-1.2/src/libb64.a MICROHTTPD=-lmicrohttpd ODOORS = deps/odoors/libs-`uname -s`/libODoors.a -all: magicka magimail magiedit +all: magicka magimail magiedit ticproc ${LUA}: cd deps/lua && $(MAKE) -f Makefile macosx MAKEFLAGS= @@ -38,6 +38,9 @@ magimail: $(JAMLIB) magiedit: $(ODOORS) cd utils/magiedit && $(MAKE) +ticproc: + cd utils/ticproc && $(MAKE) + .PHONY: clean clean: @@ -48,3 +51,4 @@ clean: cd utils/magimail && $(MAKE) cleanlinux cd utils/magiedit && $(MAKE) clean cd deps/odoors/ && rm -rf libs-`uname -s` objs-`uname -s` exe-`uname -s` + cd utils/ticproc && $(MAKE) clean \ No newline at end of file diff --git a/utils/ticproc/Makefile b/utils/ticproc/Makefile index 4038849..fce54f4 100644 --- a/utils/ticproc/Makefile +++ b/utils/ticproc/Makefile @@ -1,14 +1,29 @@ -CC=cc -CFLAGS=-I/usr/local/include +OS := $(shell uname -s) + +ifeq ($(OS), FreeBSD) + CC=cc + CFLAGS=-I/usr/local/include + LDFLAGS=-L/usr/local/lib +else +ifeq ($(OS), NetBSD) + CC=cc + CFLAGS=-I/usr/pkg/include + LDFLAGS=-L/usr/pkg/lib +else + CC=gcc + CFLAGS= + LDFLAGS= +endif + DEPS = ticproc.c -OBJ = ticproc.o ../../inih/ini.o crc32.o +OBJ = ticproc.o ../../deps/inih/ini.o crc32.o %.o: %.c $(DEPS) $(CC) -c -o $@ $< $(CFLAGS) ticproc: $(OBJ) - $(CC) -o ticproc -o $@ $^ $(CFLAGS) -L/usr/local/lib -lsqlite3 + $(CC) -o ticproc -o $@ $^ $(CFLAGS) $(LDFLAGS) -lsqlite3 .PHONY: clean diff --git a/utils/ticproc/ticproc.c b/utils/ticproc/ticproc.c index a990e47..0d73441 100644 --- a/utils/ticproc/ticproc.c +++ b/utils/ticproc/ticproc.c @@ -6,7 +6,7 @@ #include #include #include -#include "../../inih/ini.h" +#include "../../deps/inih/ini.h" #include "ticproc.h" #include "crc32.h"