]> git.pld-linux.org Git - projects/setup.git/blob - Makefile
- iocharset is deprecated
[projects/setup.git] / Makefile
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
4 VERSION         = 2.4.10
5
6 CC              = gcc
7 OPT_FLAGS       = -O2 -g
8 CFLAGS          = $(OPT_FLAGS) -Wall
9 INSTALL         = install
10 SBINDIR         = /sbin
11 ETCDIR          = /etc
12 PROFILEDIR      = $(ETCDIR)/profile.d
13 ENVDIR          = $(ETCDIR)/env.d
14 SHRCDIR         = $(ETCDIR)/shrc.d
15 #########################################
16
17 BIN_FILES       = joinpasswd
18 DOCS            = ChangeLog
19 ETC_FILES       = filesystems fstab group host.conf hosts motd mtab \
20             netgroup passwd profile protocols resolv.conf securetty \
21             services shells suid_profile
22 PROFILE_FILES   = tmp-dir.csh tmp-dir.sh
23 ENV_FILES       = EDITOR HISTFILESIZE HOME_ETC MAILCHECK MAILPATH \
24             NNTPSERVER ORGANIZATION TMOUT VISUAL
25
26 SOURCES         = joinpasswd.c
27 CLEAN           = $(BIN_FILES) *.o core *.tar.gz *.tar.bz2 *~ *.swp
28
29 #########################################
30 all: joinpasswd
31
32 joinpasswd: joinpasswd.o
33
34 .c.o:
35         $(CC) $(CPPFLAGS) $(CFLAGS) $(CDEFS) -c $< -o $@
36
37 clean:
38         rm -f $(CLEAN)
39         cd etc; rm -f $(CLEAN)
40         cd etc/profile.d; rm -f $(CLEAN)
41
42 install:
43         $(INSTALL) -d $(DESTDIR)/$(SBINDIR)
44         $(INSTALL) -d $(DESTDIR)/$(ETCDIR)
45         $(INSTALL) -d $(DESTDIR)/$(PROFILEDIR)
46         $(INSTALL) -d  $(DESTDIR)/$(ENVDIR)
47         $(INSTALL) $(BIN_FILES) $(DESTDIR)/$(SBINDIR)
48         cd etc; $(INSTALL) $(ETC_FILES) $(DESTDIR)/$(ETCDIR)
49         cd etc/profile.d; $(INSTALL) $(PROFILE_FILES) $(DESTDIR)/$(PROFILEDIR)
50         cd etc/env.d; $(INSTALL) $(ENV_FILES) $(DESTDIR)/$(ENVDIR)
51
52 dist: clean
53         
54         $(INSTALL) -d setup-$(VERSION)/etc/profile.d
55         $(INSTALL) -d setup-$(VERSION)/etc/env.d
56         $(INSTALL) -d setup-$(VERSION)/etc/shrc.d
57         $(INSTALL) $(DOCS) $(SOURCES) Makefile setup-$(VERSION)
58         for file in $(ETC_FILES); do \
59                 $(INSTALL) etc/$$file setup-$(VERSION)/etc; \
60         done
61         for file in $(PROFILE_FILES); do \
62                 $(INSTALL) etc/profile.d/$$file setup-$(VERSION)/etc/profile.d; \
63         done
64         for file in $(ENV_FILES); do \
65                 $(INSTALL) etc/env.d/$$file setup-$(VERSION)/etc/env.d; \
66         done
67         tar -cvjf setup-$(VERSION).tar.bz2 setup-$(VERSION)
68         rm -rf setup-$(VERSION)
This page took 0.397524 seconds and 3 git commands to generate.