diff options
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | src/Makefile | 22 | ||||
-rw-r--r-- | src/lcurses/Makefile | 1 | ||||
-rw-r--r-- | src/luasec/Makefile | 6 |
4 files changed, 17 insertions, 16 deletions
diff --git a/README.md b/README.md index a44b7c5..8fc9e82 100644 --- a/README.md +++ b/README.md @@ -31,8 +31,8 @@ No matter what app you run, you are always guaranteed access to a single obvious, consistent way (currently the hotkey `ctrl-e`) to edit its sources. And to run the updates after editing. ([video](https://archive.org/details/akkartik-2021-11-14)) -[1] Tested so far on Linux and Mac OSX; should also work on BSD, WSL on -Windows, etc. +[1] Tested so far on Linux, Mac OS X and OpenBSD; should also work on other +flavors of BSD, WSL on Windows, etc. with only minor modifications. ## Isn't this just an IDE? diff --git a/src/Makefile b/src/Makefile index d49232c..d4de298 100644 --- a/src/Makefile +++ b/src/Makefile @@ -8,7 +8,7 @@ PLAT= none CC= gcc -CFLAGS= -g -O2 -std=c99 -Wall -Wpedantic -Wshadow $(MYCFLAGS) +CFLAGS= -g -O2 -std=c99 -Wall -Wshadow $(MYCFLAGS) AR= ar rc RANLIB= ranlib RM= rm -f @@ -28,8 +28,7 @@ CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \ lundump.o lvm.o lzio.o \ kilo.o LIB_O= lauxlib.o lbaselib.o menu.o ldblib.o liolib.o lmathlib.o \ - loslib.o ltablib.o lstrlib.o loadlib.o linit.o \ - lcurses/curses.o + loslib.o ltablib.o lstrlib.o loadlib.o linit.o LUA_T= teliva LUA_O= lua.o @@ -51,7 +50,7 @@ $(LUA_A): $(CORE_O) $(LIB_O) $(RANLIB) $@ $(LUA_T): $(LUA_O) $(LUA_A) - $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) luasocket/socket.a luasocket/mime.a luasec/ssl.a $(LIBS) + $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) lcurses/curses.o luasocket/socket.a luasocket/mime.a luasec/ssl.a $(LIBS) clean: $(MAKE) -C luasocket clean @@ -85,7 +84,10 @@ ansi: $(MAKE) all MYCFLAGS=-DLUA_ANSI bsd: - $(MAKE) all MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS="-Wl,-E" + $(MAKE) -C lcurses + $(MAKE) -C luasocket freebsd + $(MAKE) -C luasec bsd + $(MAKE) all MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS="-Wl,-E -lncurses" freebsd: $(MAKE) all MYCFLAGS="-DLUA_USE_LINUX" MYLIBS="-Wl,-E" @@ -94,14 +96,16 @@ generic: $(MAKE) all MYCFLAGS= linux: + $(MAKE) -C lcurses $(MAKE) -C luasocket linux $(MAKE) -C luasec linux - $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lncursesw" + $(MAKE) all MYCFLAGS="-Wpedantic -DLUA_USE_LINUX" MYLIBS="-Wl,-E -ldl -lncursesw" macosx: + $(MAKE) -C lcurses $(MAKE) -C luasocket macosx $(MAKE) -C luasec macosx - $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-lncurses" + $(MAKE) all MYCFLAGS="-Wpedantic -DLUA_USE_LINUX" MYLIBS="-lncurses" # use this on Mac OS X 10.3- # $(MAKE) all MYCFLAGS=-DLUA_USE_MACOSX @@ -177,8 +181,4 @@ lzio.o: lzio.c lua.h luaconf.h llimits.h lmem.h lstate.h lobject.h ltm.h \ print.o: print.c ldebug.h lstate.h lua.h luaconf.h lobject.h llimits.h \ ltm.h lzio.h lmem.h lopcodes.h lundump.h -lcurses/curses.o: lcurses/curses.c lcurses/window.c lcurses/chstr.c \ - lcurses/_helpers.c lcurses/compat-5.2.c lcurses/compat-5.2.h \ - lcurses/strlcpy.c - # (end of Makefile) diff --git a/src/lcurses/Makefile b/src/lcurses/Makefile new file mode 100644 index 0000000..3214fcb --- /dev/null +++ b/src/lcurses/Makefile @@ -0,0 +1 @@ +curses.o: curses.c window.c chstr.c _helpers.c compat-5.2.c compat-5.2.h strlcpy.c diff --git a/src/luasec/Makefile b/src/luasec/Makefile index b1a52a9..8c84079 100644 --- a/src/luasec/Makefile +++ b/src/luasec/Makefile @@ -9,15 +9,15 @@ OBJS= \ config.o \ ec.o -WARN=-Wall -Wpedantic -Wshadow +WARN=-Wall -Wshadow BSD_CFLAGS=-O2 -fPIC $(WARN) $(DEFS) BSD_LDFLAGS=-O -fPIC -shared -linux_CFLAGS=-g -O2 -std=c99 $(WARN) $(DEFS) +linux_CFLAGS=-g -O2 -std=c99 $(WARN) -Wpedantic $(DEFS) macosx_ENV=env MACOSX_DEPLOYMENT_TARGET='$(MACVER)' -macosx_CFLAGS=-g -O2 -std=c99 -fno-common $(WARN) $(DEFS) -I/usr/local/opt/openssl@3/include +macosx_CFLAGS=-g -O2 -std=c99 -fno-common $(WARN) -Wpedantic $(DEFS) -I/usr/local/opt/openssl@3/include macosx_LDFLAGS=-bundle -undefined dynamic_lookup -L/usr/local/opt/openssl@3/lib INSTALL = install |