aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorsin <sin@2f30.org>2019-08-02 15:43:07 +0100
committersin <sin@2f30.org>2019-08-03 22:28:36 +0100
commit50592339bf450037972b85777d1c524e35545aa8 (patch)
treedc1fcea3d52e382b37f50c45d16cb9dc9b5a8036 /Makefile
parent47d659c5fc930f0815c2bf5a24b3c2228b13695e (diff)
downloadnoice-50592339bf450037972b85777d1c524e35545aa8.tar.gz
Implement nopen(1)
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile48
1 files changed, 28 insertions, 20 deletions
diff --git a/Makefile b/Makefile
index a9ad868..67efb04 100644
--- a/Makefile
+++ b/Makefile
@@ -1,45 +1,53 @@
VERSION = 0.8
-
PREFIX = /usr/local
MANPREFIX = $(PREFIX)/man
#CPPFLAGS = -DDEBUG
#CFLAGS = -g
-LDLIBS = -lcurses
-DISTFILES = noice.c strlcat.c strlcpy.c strverscmp.c util.h config.def.h\
- noice.1 Makefile README LICENSE
-OBJ = noice.o strlcat.o strlcpy.o strverscmp.o
-BIN = noice
+NOICELDLIBS = -lcurses
+NOPENLDLIBS =
+NOICEOBJ = noice.o spawn.o strlcat.o strlcpy.o strverscmp.o
+NOPENOBJ = nopen.o spawn.o
+BIN = noice nopen
+MAN = noice.1 nopen.1
all: $(BIN)
-$(BIN): $(OBJ)
- $(CC) $(CFLAGS) -o $@ $(OBJ) $(LDFLAGS) $(LDLIBS)
+noice: $(NOICEOBJ)
+ $(CC) $(CFLAGS) -o $@ $(NOICEOBJ) $(LDFLAGS) $(NOICELDLIBS)
+
+nopen: $(NOPENOBJ)
+ $(CC) $(CFLAGS) -o $@ $(NOPENOBJ) $(LDFLAGS) $(NOPENLDLIBS)
-noice.o: util.h config.h
+noice.o: noiceconf.h util.h
+nopen.o: nopenconf.h util.h
+spawn.o: util.h
strlcat.o: util.h
strlcpy.o: util.h
+strverscmp.o: util.h
+
+noiceconf.h:
+ cp noiceconf.def.h $@
-config.h:
- cp config.def.h $@
+nopenconf.h:
+ cp nopenconf.def.h $@
install: all
mkdir -p $(DESTDIR)$(PREFIX)/bin
cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin
mkdir -p $(DESTDIR)$(MANPREFIX)/man1
- cp -f $(BIN).1 $(DESTDIR)$(MANPREFIX)/man1
+ cp -f $(MAN) $(DESTDIR)$(MANPREFIX)/man1
uninstall:
- rm -f $(DESTDIR)$(PREFIX)/bin/$(BIN)
- rm -f $(DESTDIR)$(MANPREFIX)/man1/$(BIN).1
+ cd $(DESTDIR)$(PREFIX)/bin && rm -f $(BIN)
+ cd $(DESTDIR)$(MANPREFIX)/man1 && rm -f $(MAN)
-dist:
+dist: clean
mkdir -p noice-$(VERSION)
- cp $(DISTFILES) noice-$(VERSION)
- tar -cf noice-$(VERSION).tar noice-$(VERSION)
- gzip noice-$(VERSION).tar
- rm -rf noice-$(VERSION)
+ cp `find . -maxdepth 1 -type f` noice-$(VERSION)
+ tar -c noice-$(VERSION) | gzip > noice-$(VERSION).tar.gz
clean:
- rm -f $(BIN) $(OBJ) noice-$(VERSION).tar.gz
+ rm -f $(BIN) $(NOICEOBJ) $(NOPENOBJ) noice-$(VERSION).tar.gz
+ rm -rf noice-$(VERSION)
Un proyecto texto-plano.xyz