X-Git-Url: https://git.pld-linux.org/?a=blobdiff_plain;f=Makefile;h=98e0af84088c50e58e1a8648ae04cdaca4d0dfe0;hb=c2270ab060eec5f143a9a289098dd728c05377ca;hp=60759592253dc5a5087fa0ca9972cbae3111fd63;hpb=a2f3ee1149c932181f78130ac4295a035fc8b2f6;p=projects%2Fsetup.git diff --git a/Makefile b/Makefile index 6075959..98e0af8 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,12 @@ # Very basic and very simple Makefile. Maybe it would be nice to make it # in ac/am.... but I'm too lazy ;) # -VERSION = 2.5.7 +VERSION = 2.10.0 CC = gcc -OPT_FLAGS = -O2 -g -CFLAGS = $(OPT_FLAGS) -Wall -INSTALL = install +OPT_FLAGS = -Wformat -Werror=format-security -fvar-tracking-assignments -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector -O2 -g2 -Wall +CFLAGS = $(OPT_FLAGS) -Wall -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 +INSTALL = install -p SBINDIR = /sbin ETCDIR = /etc PROFILEDIR = $(ETCDIR)/profile.d @@ -14,16 +14,17 @@ ENVDIR = $(ETCDIR)/env.d SHRCDIR = $(ETCDIR)/shrc.d ######################################### -BIN_FILES = joinpasswd update-fstab postshell +BIN_FILES = joinpasswd update-fstab postshell delpasswd DOCS = ChangeLog -ETC_FILES = filesystems fstab group host.conf hosts motd mtab \ +ETC_FILES = filesystems fstab group host.conf hosts motd \ netgroup passwd profile protocols resolv.conf securetty \ - services shells suid_profile -PROFILE_FILES = tmp-dir.csh tmp-dir.sh + services shells suid_profile subgid subuid +PROFILE_FILES = 00-tmp-dir.csh 00-tmp-dir.sh ENV_FILES = EDITOR HISTFILESIZE HOME_ETC MAILCHECK MAILPATH \ NNTPSERVER ORGANIZATION TMOUT VISUAL +SHRC_FILES = 256term.csh 256term.sh -SOURCES = joinpasswd.c update-fstab.c postshell.c +SOURCES = joinpasswd.c update-fstab.c postshell.c delpasswd.c CLEAN = $(BIN_FILES) *.o core *.tar.gz *.tar.bz2 *~ *.swp ######################################### @@ -32,24 +33,28 @@ all: $(BIN_FILES) joinpasswd: joinpasswd.o update-fstab: update-fstab.o postshell: postshell.o +delpasswd: delpasswd.o .c.o: $(CC) $(CPPFLAGS) $(CFLAGS) $(CDEFS) -c $< -o $@ clean: rm -f $(CLEAN) - cd etc; rm -f $(CLEAN) - cd etc/profile.d; rm -f $(CLEAN) + cd etc && rm -f $(CLEAN) + cd etc/profile.d && rm -f $(CLEAN) -install: +install: $(BIN_FILES) $(INSTALL) -d $(DESTDIR)/$(SBINDIR) $(INSTALL) -d $(DESTDIR)/$(ETCDIR) $(INSTALL) -d $(DESTDIR)/$(PROFILEDIR) - $(INSTALL) -d $(DESTDIR)/$(ENVDIR) + $(INSTALL) -d $(DESTDIR)/$(ENVDIR) + $(INSTALL) -d $(DESTDIR)/$(SHRCDIR) $(INSTALL) $(BIN_FILES) $(DESTDIR)/$(SBINDIR) - cd etc; $(INSTALL) $(ETC_FILES) $(DESTDIR)/$(ETCDIR) - cd etc/profile.d; $(INSTALL) $(PROFILE_FILES) $(DESTDIR)/$(PROFILEDIR) - cd etc/env.d; $(INSTALL) $(ENV_FILES) $(DESTDIR)/$(ENVDIR) + cd etc && $(INSTALL) -m644 $(ETC_FILES) $(DESTDIR)/$(ETCDIR) + ln -sf /proc/self/mounts $(DESTDIR)/$(ETCDIR)/mtab + cd etc/profile.d && $(INSTALL) -m755 $(PROFILE_FILES) $(DESTDIR)/$(PROFILEDIR) + cd etc/env.d && $(INSTALL) -m644 $(ENV_FILES) $(DESTDIR)/$(ENVDIR) + cd etc/shrc.d && $(INSTALL) -m644 $(SHRC_FILES) $(DESTDIR)/$(SHRCDIR) dist: changelog clean $(INSTALL) -d setup-$(VERSION)/etc/profile.d @@ -65,6 +70,9 @@ dist: changelog clean for file in $(ENV_FILES); do \ $(INSTALL) -m644 etc/env.d/$$file setup-$(VERSION)/etc/env.d; \ done + for file in $(SHRC_FILES); do \ + $(INSTALL) -m644 etc/shrc.d/$$file setup-$(VERSION)/etc/shrc.d; \ + done tar -cvjf setup-$(VERSION).tar.bz2 setup-$(VERSION) rm -rf setup-$(VERSION)