aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.gitignore12
-rw-r--r--Makefile19
-rw-r--r--autopasswd.c (renamed from src/autopasswd.c)0
-rw-r--r--config.mk10
4 files changed, 17 insertions, 24 deletions
diff --git a/.gitignore b/.gitignore
index 24a1673..6a775e8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,13 +1,5 @@
-_/
-bin/
-obj/
-\#*\#
-.*
-!.git*
+*\#*
*~
-*.sw[op]
-*.bak
*.o
-*.out
-*.gch
*.su
+/autopasswd
diff --git a/Makefile b/Makefile
index 55ddd0a..a708475 100644
--- a/Makefile
+++ b/Makefile
@@ -6,20 +6,18 @@
CONFIGFILE = config.mk
include $(CONFIGFILE)
-all: bin/autopasswd
+all: autopasswd
-bin/autopasswd: obj/autopasswd.o
- @mkdir -p bin
- $(CC) -o $@ obj/autopasswd.o $(LDFLAGS)
+.o:
+ $(CC) -o $@ $< $(LDFLAGS)
-obj/%.o: src/%.c
- @mkdir -p obj
+.c.o:
$(CC) -c -o $@ $< $(CFLAGS) $(CPPFLAGS)
-install: bin/autopasswd
+install: autopasswd
mkdir -p -- "$(DESTDIR)$(BINDIR)"
mkdir -p -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)"
- cp -- bin/autopasswd "$(DESTDIR)$(BINDIR)/$(COMMAND)"
+ cp -- autopasswd "$(DESTDIR)$(BINDIR)/$(COMMAND)"
cp -- COPYING LICENSE "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)/"
uninstall:
@@ -29,6 +27,9 @@ uninstall:
-rmdir -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)"
clean:
- -rm -rf -- bin obj
+ -rm -f -- *.o *.su autopasswd
+
+.SUFFIXES:
+.SUFFIXES: .o .c
.PHONY: all install uninstall clean
diff --git a/src/autopasswd.c b/autopasswd.c
index bf8ac76..bf8ac76 100644
--- a/src/autopasswd.c
+++ b/autopasswd.c
diff --git a/config.mk b/config.mk
index 856eeca..b83189c 100644
--- a/config.mk
+++ b/config.mk
@@ -1,8 +1,8 @@
-PREFIX = /usr
-BIN = /bin
-BINDIR = $(PREFIX)$(BIN)
-DATA = /share
-DATADIR = $(PREFIX)$(DATA)
+PREFIX = /usr
+BIN = /bin
+BINDIR = $(PREFIX)$(BIN)
+DATA = /share
+DATADIR = $(PREFIX)$(DATA)
LICENSEDIR = $(DATADIR)/licenses
PKGNAME = autopasswd