]> git.pld-linux.org Git - projects/setup.git/blame - Makefile
- fstab patch
[projects/setup.git] / Makefile
CommitLineData
e040c79e
PG
1# Very basic and very simple Makefile. Maybe it would be nice to make it
2# in ac/am.... but I'm too lazy ;)
3#
6b9aeb8b 4VERSION = 2.4.6
e040c79e
PG
5
6CC = gcc
7OPT_FLAGS = -O2 -g
8CFLAGS = $(OPT_FLAGS) -Wall
9INSTALL = install
10SBINDIR = /sbin
11ETCDIR = /etc
924d1ea5 12PROFILEDIR = $(ETCDIR)/profile.d
6b9aeb8b 13ENVDIR = $(ETCDIR)/env.d
e040c79e
PG
14#########################################
15
16BIN_FILES = joinpasswd
17DOCS = ChangeLog
18ETC_FILES = filesystems fstab group host.conf hosts motd mtab \
19 netgroup passwd profile protocols resolv.conf securetty \
df003d76 20 services shells suid_profile
e040c79e 21PROFILE_FILES = tmp-dir.csh tmp-dir.sh
df003d76
PG
22ENV_FILES = EDITOR HISTFILESIZE HOME_ETC MAILCHECK MAILPATH \
23 NNTPSERVER ORGANIZATION TMOUT VISUAL
e040c79e
PG
24
25SOURCES = joinpasswd.c
26CLEAN = $(BIN_FILES) *.o core *.tar.gz *.tar.bz2 *~ *.swp
27
28#########################################
29all: joinpasswd
30
31joinpasswd: joinpasswd.o
32
33.c.o:
34 $(CC) $(CPPFLAGS) $(CFLAGS) $(CDEFS) -c $< -o $@
35
36clean:
37 rm -f $(CLEAN)
38 cd etc; rm -f $(CLEAN)
39 cd etc/profile.d; rm -f $(CLEAN)
40
41install:
42 $(INSTALL) -d $(DESTDIR)/$(SBINDIR)
43 $(INSTALL) -d $(DESTDIR)/$(ETCDIR)
44 $(INSTALL) -d $(DESTDIR)/$(PROFILEDIR)
6b9aeb8b 45 $(INSTALL) -d $(DESTDIR)/$(ENVDIR)
e040c79e
PG
46 $(INSTALL) $(BIN_FILES) $(DESTDIR)/$(SBINDIR)
47 cd etc; $(INSTALL) $(ETC_FILES) $(DESTDIR)/$(ETCDIR)
48 cd etc/profile.d; $(INSTALL) $(PROFILE_FILES) $(DESTDIR)/$(PROFILEDIR)
6b9aeb8b 49 cd etc/env.d; $(INSTALL) $(ENV_FILES) $(DESTDIR)/$(ENVDIR)
e040c79e
PG
50
51dist: clean
52
53 $(INSTALL) -d setup-$(VERSION)/etc/profile.d
42435ea0 54 $(INSTALL) -d setup-$(VERSION)/etc/env.d
924d1ea5 55 $(INSTALL) $(DOCS) $(SOURCES) Makefile setup-$(VERSION)
e040c79e
PG
56 for file in $(ETC_FILES); do \
57 $(INSTALL) etc/$$file setup-$(VERSION)/etc; \
58 done
59 for file in $(PROFILE_FILES); do \
60 $(INSTALL) etc/profile.d/$$file setup-$(VERSION)/etc/profile.d; \
61 done
42435ea0
PG
62 for file in $(ENV_FILES); do \
63 $(INSTALL) etc/env.d/$$file setup-$(VERSION)/etc/env.d; \
64 done
e040c79e
PG
65 tar -cvjf setup-$(VERSION).tar.bz2 setup-$(VERSION)
66 rm -rf setup-$(VERSION)
This page took 0.032803 seconds and 4 git commands to generate.