DESTDIR = #prefix = /usr/local prefix = /usr exec_prefix = $(prefix) bindir = $(exec_prefix)/bin #sbindir = $(exec_prefix)/sbin sbindir = $(bindir) #libexecdir = $(exec_prefix)/libexec libexecdir = $(exec_prefix)/lib #sysconfdir = $(prefix)/etc sysconfdir = /etc/conf.d systemddir = $(prefix)/lib/systemd/system pkglibexecdir = $(libexecdir)/parabolaweb-utils pkgconffile = $(sysconfdir)/parabolaweb CFLAGS += -std=c99 -Wall -Wextra -Werror -Wno-unused-parameter CPPFLAGS += -DSCRIPT_LOCATION='"$(pkglibexecdir)/parabolaweb-changepassword.real"' targets = \ $(DESTDIR)$(sbindir)/parabolaweb-changepassword \ $(DESTDIR)$(sbindir)/parabolaweb-fcgi \ $(DESTDIR)$(sbindir)/parabolaweb-reporead-inotify \ $(DESTDIR)$(sbindir)/parabolaweb-update \ $(DESTDIR)$(pkglibexecdir)/parabolaweb-changepassword.real \ $(DESTDIR)$(systemddir)/parabolaweb.service \ $(DESTDIR)$(systemddir)/parabolaweb-reporead-inotify.service all: depends.txt $(notdir $(targets)) parabolaweb.conf install: $(targets) $(sysconffile) # Pattern rules %: %.in sed -e 's|@sbindir@|$(sbindir)|' -e 's|@pkgconffile@|$(pkgconffile)|' < $< > $@ $(DESTDIR)$(sbindir)/%: % install -Dm755 $< $@ $(DESTDIR)$(pkglibexecdir)/%: % install -Dm755 $< $@ $(DESTDIR)$(systemddir)/%.service: %.service install -Dm644 $< $@ # Specific rules depends.txt: list-depends depends_static.txt $< > $@ $(DESTDIR)$(sbindir)/parabolaweb-changepassword: parabolaweb-changepassword install -Dm6755 $< $@ $(DESTDIR)(pkgconffile): parabolaweb.conf install -Dm644 $< $@ .DELETE_ON_ERROR: