1 # Very basic and very simple Makefile. Maybe it would be nice to make it
2 # in ac/am.... but I'm too lazy ;)
8 CFLAGS = $(OPT_FLAGS) -Wall
12 PROFILEDIR = $(ETCDIR)/profile.d
13 ENVDIR = $(ETCDIR)/env.d
14 #########################################
16 BIN_FILES = joinpasswd
18 ETC_FILES = filesystems fstab group host.conf hosts motd mtab \
19 netgroup passwd profile protocols resolv.conf securetty \
21 PROFILE_FILES = tmp-dir.csh tmp-dir.sh
22 ENV_FILES = EDITOR HISTFILESIZE HOME_ETC NNTPSERVER ORGANIZATION VISUAL
24 SOURCES = joinpasswd.c
25 CLEAN = $(BIN_FILES) *.o core *.tar.gz *.tar.bz2 *~ *.swp
27 #########################################
30 joinpasswd: joinpasswd.o
33 $(CC) $(CPPFLAGS) $(CFLAGS) $(CDEFS) -c $< -o $@
37 cd etc; rm -f $(CLEAN)
38 cd etc/profile.d; rm -f $(CLEAN)
41 $(INSTALL) -d $(DESTDIR)/$(SBINDIR)
42 $(INSTALL) -d $(DESTDIR)/$(ETCDIR)
43 $(INSTALL) -d $(DESTDIR)/$(PROFILEDIR)
44 $(INSTALL) -d $(DESTDIR)/$(ENVDIR)
45 $(INSTALL) $(BIN_FILES) $(DESTDIR)/$(SBINDIR)
46 cd etc; $(INSTALL) $(ETC_FILES) $(DESTDIR)/$(ETCDIR)
47 cd etc/profile.d; $(INSTALL) $(PROFILE_FILES) $(DESTDIR)/$(PROFILEDIR)
48 cd etc/env.d; $(INSTALL) $(ENV_FILES) $(DESTDIR)/$(ENVDIR)
52 $(INSTALL) -d setup-$(VERSION)/etc/profile.d
53 $(INSTALL) -d setup-$(VERSION)/etc/env.d
54 $(INSTALL) $(DOCS) $(SOURCES) Makefile setup-$(VERSION)
55 for file in $(ETC_FILES); do \
56 $(INSTALL) etc/$$file setup-$(VERSION)/etc; \
58 for file in $(PROFILE_FILES); do \
59 $(INSTALL) etc/profile.d/$$file setup-$(VERSION)/etc/profile.d; \
61 for file in $(ENV_FILES); do \
62 $(INSTALL) etc/env.d/$$file setup-$(VERSION)/etc/env.d; \
64 tar -cvjf setup-$(VERSION).tar.bz2 setup-$(VERSION)
65 rm -rf setup-$(VERSION)