]> git.pld-linux.org Git - projects/setup.git/blame - Makefile
- suid_profile for privileged shell mode. Few more variables.
[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 \
20 services shells
21PROFILE_FILES = tmp-dir.csh tmp-dir.sh
6b9aeb8b 22ENV_FILES = EDITOR HISTFILESIZE HOME_ETC NNTPSERVER ORGANIZATION VISUAL
e040c79e
PG
23
24SOURCES = joinpasswd.c
25CLEAN = $(BIN_FILES) *.o core *.tar.gz *.tar.bz2 *~ *.swp
26
27#########################################
28all: joinpasswd
29
30joinpasswd: joinpasswd.o
31
32.c.o:
33 $(CC) $(CPPFLAGS) $(CFLAGS) $(CDEFS) -c $< -o $@
34
35clean:
36 rm -f $(CLEAN)
37 cd etc; rm -f $(CLEAN)
38 cd etc/profile.d; rm -f $(CLEAN)
39
40install:
41 $(INSTALL) -d $(DESTDIR)/$(SBINDIR)
42 $(INSTALL) -d $(DESTDIR)/$(ETCDIR)
43 $(INSTALL) -d $(DESTDIR)/$(PROFILEDIR)
6b9aeb8b 44 $(INSTALL) -d $(DESTDIR)/$(ENVDIR)
e040c79e
PG
45 $(INSTALL) $(BIN_FILES) $(DESTDIR)/$(SBINDIR)
46 cd etc; $(INSTALL) $(ETC_FILES) $(DESTDIR)/$(ETCDIR)
47 cd etc/profile.d; $(INSTALL) $(PROFILE_FILES) $(DESTDIR)/$(PROFILEDIR)
6b9aeb8b 48 cd etc/env.d; $(INSTALL) $(ENV_FILES) $(DESTDIR)/$(ENVDIR)
e040c79e
PG
49
50dist: clean
51
52 $(INSTALL) -d setup-$(VERSION)/etc/profile.d
42435ea0 53 $(INSTALL) -d setup-$(VERSION)/etc/env.d
924d1ea5 54 $(INSTALL) $(DOCS) $(SOURCES) Makefile setup-$(VERSION)
e040c79e
PG
55 for file in $(ETC_FILES); do \
56 $(INSTALL) etc/$$file setup-$(VERSION)/etc; \
57 done
58 for file in $(PROFILE_FILES); do \
59 $(INSTALL) etc/profile.d/$$file setup-$(VERSION)/etc/profile.d; \
60 done
42435ea0
PG
61 for file in $(ENV_FILES); do \
62 $(INSTALL) etc/env.d/$$file setup-$(VERSION)/etc/env.d; \
63 done
e040c79e
PG
64 tar -cvjf setup-$(VERSION).tar.bz2 setup-$(VERSION)
65 rm -rf setup-$(VERSION)
This page took 0.068585 seconds and 4 git commands to generate.