]> git.pld-linux.org Git - projects/setup.git/blame - Makefile
- prepared Makefile to make creating new releases easier. Do (finally!!)
[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#
4VERSION = 2.4.3
5
6CC = gcc
7OPT_FLAGS = -O2 -g
8CFLAGS = $(OPT_FLAGS) -Wall
9INSTALL = install
10SBINDIR = /sbin
11ETCDIR = /etc
12PROFILEDIR = $(ETCDIR)/profil.d
13#########################################
14
15BIN_FILES = joinpasswd
16DOCS = ChangeLog
17ETC_FILES = filesystems fstab group host.conf hosts motd mtab \
18 netgroup passwd profile protocols resolv.conf securetty \
19 services shells
20PROFILE_FILES = tmp-dir.csh tmp-dir.sh
21
22SOURCES = joinpasswd.c
23CLEAN = $(BIN_FILES) *.o core *.tar.gz *.tar.bz2 *~ *.swp
24
25#########################################
26all: joinpasswd
27
28joinpasswd: joinpasswd.o
29
30.c.o:
31 $(CC) $(CPPFLAGS) $(CFLAGS) $(CDEFS) -c $< -o $@
32
33clean:
34 rm -f $(CLEAN)
35 cd etc; rm -f $(CLEAN)
36 cd etc/profile.d; rm -f $(CLEAN)
37
38install:
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)
45
46dist: clean
47
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; \
52 done
53 for file in $(PROFILE_FILES); do \
54 $(INSTALL) etc/profile.d/$$file setup-$(VERSION)/etc/profile.d; \
55 done
56 tar -cvjf setup-$(VERSION).tar.bz2 setup-$(VERSION)
57 rm -rf setup-$(VERSION)
This page took 0.095133 seconds and 4 git commands to generate.