Magellan Linux

Annotation of /mcore-src/trunk/mcore-tools/src/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2434 - (hide annotations) (download)
Thu Sep 3 12:34:30 2015 UTC (8 years, 8 months ago) by niro
File size: 1750 byte(s)
-added mcore-register-client binary
1 niro 2232
2 niro 2142 include ../Makefile.inc
3    
4 niro 2232 SUBDIRS = include modules
5     FILES = mcored.confd
6 niro 2434 SCRIPTS = generate-certificate mcored mcorepasswd mcore-controld mcore-register-client
7 niro 2232 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 niro 2295 $(INSTALL) -m0755 generate-certificate $(DESTDIR)/$(MCORE_LIBDIR)/mcore-generate-certificate
31 niro 2232 $(LN) $(MCORE_LIBDIR)/mcorepasswd $(DESTDIR)/$(BINDIR)/mcorepasswd
32 niro 2295 $(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 niro 2434 $(INSTALL) -m0755 mcore-register-client $(DESTDIR)/$(BINDIR)
42 niro 2251 $(INSTALL) -m0755 mcored $(DESTDIR)/$(MCORE_LIBDIR)
43     $(LN) $(MCORE_LIBDIR)/mcored $(DESTDIR)/$(SBINDIR)/mcored
44 niro 2142
45 niro 2232 clean: $(CLEANDIRS)
46     rm -f $(PROGS)
47     rm -f $(SCRIPTS)
48     rm -f $(FILES)
49    
50     $(SUBDIRS):
51     $(MAKE) -C $@
52    
53     $(INSTALLDIRS):
54     $(MAKE) -C $(@:install-%=%) install
55    
56     $(CLEANDIRS):
57     $(MAKE) -C $(@:clean-%=%) clean
58    
59    
60     .PHONY: $(SUBDIRS)
61     .PHONY: $(INSTALLDIRS)
62     .PHONY: $(CLEANDIRS)
63 niro 2251 .PHONY: install-common
64     .PHONY: install-client
65 niro 2142 .PHONY: all install clean