Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


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