Annotation of /mcore-src/trunk/mcore-tools/src/Makefile
Parent Directory | Revision Log
Revision 2251 -
(hide annotations)
(download)
Mon Jan 13 14:04:28 2014 UTC (10 years, 8 months ago) by niro
File size: 1624 byte(s)
Mon Jan 13 14:04:28 2014 UTC (10 years, 8 months ago) by niro
File size: 1624 byte(s)
-moved systemd and sysvinit init files to subdirs
1 | niro | 2232 | |
2 | niro | 2142 | include ../Makefile.inc |
3 | |||
4 | niro | 2232 | SUBDIRS = include modules |
5 | FILES = mcored.confd | ||
6 | SCRIPTS = generate-certificate mcored mcorepasswd | ||
7 | PROGS = xinfo.o xinfo | ||
8 | niro | 2142 | |
9 | niro | 2232 | ifeq ($(SYSTEMINIT),systemd) |
10 | CLIENT_CLASSES += systemd | ||
11 | niro | 2251 | SUBDIRS += systemd |
12 | niro | 2232 | else |
13 | CLIENT_CLASSES += sysvinit | ||
14 | niro | 2251 | SUBDIRS += sysvinit |
15 | niro | 2232 | endif |
16 | niro | 2142 | |
17 | niro | 2232 | xinfo_CFLAGS = -lX11 |
18 | niro | 2142 | |
19 | niro | 2232 | INSTALLDIRS = $(SUBDIRS:%=install-%) |
20 | CLEANDIRS = $(SUBDIRS:%=clean-%) | ||
21 | niro | 2142 | |
22 | niro | 2232 | all: $(SUBDIRS) $(PROGS) $(SCRIPTS) $(FILES) |
23 | |||
24 | niro | 2251 | install: $(INSTALLDIRS) install-client all |
25 | |||
26 | install-common: all | ||
27 | niro | 2232 | $(INSTALL) -d $(DESTDIR)/$(BINDIR) |
28 | $(INSTALL) -d $(DESTDIR)/$(MCORE_LIBDIR) | ||
29 | $(INSTALL) -m0755 mcorepasswd $(DESTDIR)/$(MCORE_LIBDIR) | ||
30 | $(INSTALL) -m0755 generate-certificate $(DESTDIR)/$(MCORE_LIBDIR) | ||
31 | $(LN) $(MCORE_LIBDIR)/mcorepasswd $(DESTDIR)/$(BINDIR)/mcorepasswd | ||
32 | $(LN) $(MCORE_LIBDIR)/mcore-generate-certificate $(DESTDIR)/$(BINDIR)/mcore-generate-certificate | ||
33 | niro | 2142 | |
34 | niro | 2251 | install-client: install-common install-$(SYSTEMINIT) all |
35 | niro | 2232 | $(INSTALL) -d $(DESTDIR)/$(CONFDDIR) |
36 | niro | 2251 | $(INSTALL) -d $(DESTDIR)/$(BINDIR) |
37 | $(INSTALL) -d $(DESTDIR)/$(SBINDIR) | ||
38 | $(INSTALL) -d $(DESTDIR)/$(MCORE_LIBDIR) | ||
39 | niro | 2232 | $(INSTALL) -m0644 mcored.confd $(DESTDIR)/$(CONFDDIR)/mcored |
40 | niro | 2251 | $(INSTALL) -m0755 xinfo $(DESTDIR)/$(BINDIR) |
41 | $(INSTALL) -m0755 mcored $(DESTDIR)/$(MCORE_LIBDIR) | ||
42 | $(LN) $(MCORE_LIBDIR)/mcored $(DESTDIR)/$(SBINDIR)/mcored | ||
43 | niro | 2142 | |
44 | niro | 2232 | clean: $(CLEANDIRS) |
45 | rm -f $(PROGS) | ||
46 | rm -f $(SCRIPTS) | ||
47 | rm -f $(FILES) | ||
48 | |||
49 | $(SUBDIRS): | ||
50 | $(MAKE) -C $@ | ||
51 | |||
52 | $(INSTALLDIRS): | ||
53 | $(MAKE) -C $(@:install-%=%) install | ||
54 | |||
55 | $(CLEANDIRS): | ||
56 | $(MAKE) -C $(@:clean-%=%) clean | ||
57 | |||
58 | |||
59 | .PHONY: $(SUBDIRS) | ||
60 | .PHONY: $(INSTALLDIRS) | ||
61 | .PHONY: $(CLEANDIRS) | ||
62 | niro | 2251 | .PHONY: install-common |
63 | .PHONY: install-client | ||
64 | niro | 2142 | .PHONY: all install clean |