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)/profil.d
13 #########################################
15 BIN_FILES = joinpasswd
17 ETC_FILES = filesystems fstab group host.conf hosts motd mtab \
18 netgroup passwd profile protocols resolv.conf securetty \
20 PROFILE_FILES = tmp-dir.csh tmp-dir.sh
22 SOURCES = joinpasswd.c
23 CLEAN = $(BIN_FILES) *.o core *.tar.gz *.tar.bz2 *~ *.swp
25 #########################################
28 joinpasswd: joinpasswd.o
31 $(CC) $(CPPFLAGS) $(CFLAGS) $(CDEFS) -c $< -o $@
35 cd etc; rm -f $(CLEAN)
36 cd etc/profile.d; rm -f $(CLEAN)
39 $(INSTALL) -d $(DESTDIR)/$(SBINDIR)
40 $(INSTALL) -d $(DESTDIR)/$(ETCDIR)
41 $(INSTALL) -d $(DESTDIR)/$(PROFILEDIR)
42 $(INSTALL) $(BIN_FILES) $(DESTDIR)/$(SBINDIR)
43 cd etc; $(INSTALL) $(ETC_FILES) $(DESTDIR)/$(ETCDIR)
44 cd etc/profile.d; $(INSTALL) $(PROFILE_FILES) $(DESTDIR)/$(PROFILEDIR)
48 $(INSTALL) -d setup-$(VERSION)/etc/profile.d
49 $(INSTALL) $(DOCS) $(SOURCES) setup-$(VERSION)
50 for file in $(ETC_FILES); do \
51 $(INSTALL) etc/$$file setup-$(VERSION)/etc; \
53 for file in $(PROFILE_FILES); do \
54 $(INSTALL) etc/profile.d/$$file setup-$(VERSION)/etc/profile.d; \
56 tar -cvjf setup-$(VERSION).tar.bz2 setup-$(VERSION)
57 rm -rf setup-$(VERSION)