From 1b321026d100e696a6a8c612e15e9315cb1212b6 Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Sun, 19 May 2024 00:08:34 +0200 Subject: [PATCH] refactoring --- renovate.json => .renovaterc.json | 0 Makefile | 42 ++++++++++++++----------------- 2 files changed, 19 insertions(+), 23 deletions(-) rename renovate.json => .renovaterc.json (100%) diff --git a/renovate.json b/.renovaterc.json similarity index 100% rename from renovate.json rename to .renovaterc.json diff --git a/Makefile b/Makefile index 406db1d..b99abc8 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,25 @@ OBJ = $(SRC:.c=.o) all: st terminfo -# TODO: Update command to update submodules +*.c: buildroot +*.h: buildroot +.c.o: + $(CC) $(STCFLAGS) -c $< + +st.o: buildroot config.h st.h win.h +x.o: buildroot arg.h config.h st.h win.h $(LIGATURES_H) +config.mk: + cp config/config.mk config.mk +config.h: + cp config/config.h config.h + +$(OBJ): config.h config.mk buildroot + +st: buildroot $(OBJ) + $(CC) -o $@ $(OBJ) $(STLDFLAGS) + +terminfo: buildroot + tic -sx -o terminfo st.info clean: find . -maxdepth 1 -type f | grep -Pv "^\./\.|Makefile$$" | xargs -r rm @@ -26,28 +44,6 @@ buildroot: mv tmp/* ./ for patch in config/patches/*.diff; do patch <"$$patch"; done -config.mk: - cp config/config.mk ./config.mk - -config.h: - cp config/config.h ./config.h - -*.c: buildroot -*.h: buildroot -.c.o: - $(CC) $(STCFLAGS) -c $< - -st.o: buildroot config.h st.h win.h -x.o: buildroot arg.h config.h st.h win.h $(LIGATURES_H) - -$(OBJ): config.h config.mk buildroot - -st: buildroot $(OBJ) - $(CC) -o $@ $(OBJ) $(STLDFLAGS) - -terminfo: buildroot - tic -sx -o terminfo st.info - install: st terminfo mkdir -p $(DESTDIR)$(PREFIX)/bin cp -f st $(DESTDIR)$(PREFIX)/bin