|
|
|
@ -15,8 +15,8 @@ options:
@@ -15,8 +15,8 @@ options:
|
|
|
|
|
@echo "LDFLAGS = $(STLDFLAGS)"
|
|
|
|
|
@echo "CC = $(CC)"
|
|
|
|
|
|
|
|
|
|
config.h: |
|
|
|
|
cp config.def.h config.h
|
|
|
|
|
config.h: patch |
|
|
|
|
cp config.def.h $@
|
|
|
|
|
|
|
|
|
|
.c.o: |
|
|
|
|
$(CC) $(STCFLAGS) -c $<
|
|
|
|
@ -29,8 +29,8 @@ $(OBJ): config.h config.mk
@@ -29,8 +29,8 @@ $(OBJ): config.h config.mk
|
|
|
|
|
st: $(OBJ) |
|
|
|
|
$(CC) -o $@ $(OBJ) $(STLDFLAGS)
|
|
|
|
|
|
|
|
|
|
clean: |
|
|
|
|
rm -f st $(OBJ) st-$(VERSION).tar.gz config.h
|
|
|
|
|
clean: restore |
|
|
|
|
rm -f st $(OBJ) st-$(VERSION).tar.gz config.h *.rej *.orig
|
|
|
|
|
|
|
|
|
|
dist: clean |
|
|
|
|
mkdir -p st-$(VERSION)
|
|
|
|
@ -54,4 +54,15 @@ uninstall:
@@ -54,4 +54,15 @@ uninstall:
|
|
|
|
|
rm -f $(DESTDIR)$(PREFIX)/bin/st
|
|
|
|
|
rm -f $(DESTDIR)$(MANPREFIX)/man1/st.1
|
|
|
|
|
|
|
|
|
|
.PHONY: all options clean dist install uninstall |
|
|
|
|
backup: |
|
|
|
|
find . -iname '*.[ch]' -exec sh -c 'cp $$0 $$0.backup' {} \;
|
|
|
|
|
|
|
|
|
|
restore: |
|
|
|
|
find . -iname '*.backup' \
|
|
|
|
|
-exec sh -c 'mv $$0 "$${0%.backup}"' {} \;
|
|
|
|
|
|
|
|
|
|
patch: backup |
|
|
|
|
find ${PATCHESDIR} -iname '*.diff' -exec sh -c 'patch < $$0' {} \;
|
|
|
|
|
|
|
|
|
|
.PHONY: all options clean dist install uninstall backup patch restore |
|
|
|
|
|
|
|
|
|