ltk

Socket-based GUI for X11 (WIP)
git clone git://lumidify.org/ltk.git (fast, but not encrypted)
git clone https://lumidify.org/git/ltk.git (encrypted, but very slow)
Log | Files | Refs | README | LICENSE

commit f2c76a1f2598c0004315b637d70c8c9671457172
parent 36608c00944e3674d86eb897e70dd9aed78d5fd5
Author: lumidify <nobody@lumidify.org>
Date:   Sat, 20 Feb 2021 18:00:41 +0100

Improve makefile

Diffstat:
MMakefile | 6+++---
MREADME.md | 3---
Mconfig.mk | 5-----
Mstrtonum.c | 6+++++-
4 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,11 +1,11 @@ include config.mk -OBJ += memory.o color.o util.o ltkd.o ini.o grid.o box.o scrollbar.o button.o label.o draw.o +OBJ += strtonum.o memory.o color.o util.o ltkd.o ini.o grid.o box.o scrollbar.o button.o label.o draw.o all: ltkd ltkc -ltkd: $(OBJ) $(COMPATOBJ) - $(CC) -o $@ $(OBJ) $(COMPATOBJ) $(LDFLAGS) +ltkd: $(OBJ) + $(CC) -o $@ $(OBJ) $(LDFLAGS) ltkc: ltkc.o util.o $(CC) -o $@ ltkc.o util.o diff --git a/README.md b/README.md @@ -15,6 +15,3 @@ make If you click the top button, it should exit. That's all it does now. Also read the comment in './test.sh'. - -Note: you need to uncomment "COMPATOBJ = strtonum.c" in config.mk -if you're not using OpenBSD. diff --git a/config.mk b/config.mk @@ -11,9 +11,4 @@ OBJ = stb_truetype.o text_stb.o #CFLAGS += -DUSE_PANGO `pkg-config --cflags pangoxft` #LDFLAGS += `pkg-config --libs pangoxft` -# OpenBSD -COMPATOBJ = -# Non-OpenBSD -#COMPATOBJ = strtonum.o - CC = cc diff --git a/strtonum.c b/strtonum.c @@ -17,6 +17,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#ifndef __OpenBSD__ + #include <errno.h> #include <limits.h> #include <stdlib.h> @@ -64,4 +66,6 @@ strtonum(const char *numstr, long long minval, long long maxval, return (ll); } /* FIXME: What does this do? - lumidify */ -DEF_WEAK(strtonum); +/* DEF_WEAK(strtonum); */ + +#endif