diff options
| author | Mattias Andrée <m@maandree.se> | 2026-02-22 14:14:28 +0100 |
|---|---|---|
| committer | Mattias Andrée <m@maandree.se> | 2026-02-22 14:14:28 +0100 |
| commit | f4a40c25b29c3b4db904ef66667d129b38b279d3 (patch) | |
| tree | 6ab6bb7c5757d267045940f81d21f7465ce05e4f /Makefile | |
| parent | Update e-mail and urls (diff) | |
| download | autopasswd-f4a40c25b29c3b4db904ef66667d129b38b279d3.tar.gz autopasswd-f4a40c25b29c3b4db904ef66667d129b38b279d3.tar.bz2 autopasswd-f4a40c25b29c3b4db904ef66667d129b38b279d3.tar.xz | |
m fixes
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to '')
| -rw-r--r-- | Makefile | 57 |
1 files changed, 14 insertions, 43 deletions
@@ -3,61 +3,32 @@ # notice and this notice are preserved. This file is offered as-is, # without any warranty. -PREFIX = /usr -BIN = /bin -BINDIR = $(PREFIX)$(BIN) -DATA = /share -DATADIR = $(PREFIX)$(DATA) -LICENSEDIR = $(DATADIR)/licenses +CONFIGFILE = config.mk +include $(CONFIGFILE) -PKGNAME = autopasswd -COMMAND = autopasswd - -OPTIMISE = -O3 - -WARN = -Wall -Wextra -pedantic -Wdouble-promotion -Wformat=2 -Winit-self -Wmissing-include-dirs \ - -Wtrampolines -Wfloat-equal -Wshadow -Wmissing-prototypes -Wmissing-declarations \ - -Wredundant-decls -Wnested-externs -Winline -Wno-variadic-macros -Wswitch-default \ - -Wsync-nand -Wunsafe-loop-optimizations -Wcast-align -Wstrict-overflow -Wundef \ - -Wbad-function-cast -Wcast-qual -Wpacked -Wlogical-op -Wstrict-prototypes -Wconversion \ - -Wold-style-definition -Wvector-operation-performance -Wunsuffixed-float-constants \ - -Wsuggest-attribute=const -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure \ - -Wsuggest-attribute=format -Wnormalized=nfkc -Wdeclaration-after-statement - -F_OPTS = -ftree-vrp -fstrict-aliasing -fipa-pure-const -fstack-usage -fstrict-overflow \ - -funsafe-loop-optimizations -fno-builtin - -FLAGS = $(OPTIMISE) -std=gnu99 $(F_OPTS) $(WARN) - - -.PHONY: all all: bin/autopasswd bin/autopasswd: obj/autopasswd.o @mkdir -p bin - $(CC) $(FLAGS) -lpassphrase -largparser -lkeccak -o $@ $^ $(LDFLAGS) + $(CC) -o $@ obj/autopasswd.o $(LDFLAGS) obj/%.o: src/%.c @mkdir -p obj - $(CC) $(FLAGS) -c -o $@ $< $(CFLAGS) $(CPPFLAGS) - + $(CC) -c -o $@ $< $(CFLAGS) $(CPPFLAGS) -.PHONY: install install: bin/autopasswd - install -dm755 -- "$(DESTDIR)$(BINDIR)" - install -m755 bin/autopasswd -- "$(DESTDIR)$(BINDIR)/$(COMMAND)" - install -dm755 -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)" - install -m644 COPYING LICENSE -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)" - + mkdir -p -- "$(DESTDIR)$(BINDIR)" + mkdir -p -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)" + cp -- bin/autopasswd "$(DESTDIR)$(BINDIR)/$(COMMAND)" + cp -- COPYING LICENSE "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)/" -.PHONY: uninstall uninstall: - -rm -- "$(DESTDIR)$(BINDIR)/$(COMMAND)" - -rm -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)/COPYING" - -rm -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)/LICENSE" + -rm -f -- "$(DESTDIR)$(BINDIR)/$(COMMAND)" + -rm -f -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)/COPYING" + -rm -f -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)/LICENSE" -rmdir -- "$(DESTDIR)$(LICENSEDIR)/$(PKGNAME)" - -.PHONY: clean clean: - -rm -r bin obj + -rm -rf -- bin obj + +.PHONY: all install uninstall clean |
