Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2588 - (hide annotations) (download)
Thu Sep 17 15:02:37 2015 UTC (8 years, 7 months ago) by niro
File size: 2362 byte(s)
-added mcore-request-configuration executable and systemd service
1 niro 2232
2 niro 2142 include ../Makefile.inc
3    
4 niro 2232 SUBDIRS = include modules
5     FILES = mcored.confd
6 niro 2588 SCRIPTS = generate-certificate mcored mcorepasswd mcore-controld mcore-register-client mcore-serial mcore-request-configuration
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 2475 install: $(INSTALLDIRS) install-client install-control all
25 niro 2251
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 2588 $(INSTALL) -m0755 mcore-request-configuration $(DESTDIR)/$(BINDIR)
44 niro 2251 $(INSTALL) -m0755 mcored $(DESTDIR)/$(MCORE_LIBDIR)
45     $(LN) $(MCORE_LIBDIR)/mcored $(DESTDIR)/$(SBINDIR)/mcored
46 niro 2142
47 niro 2475 install-control: install-common install-$(SYSTEMINIT) all
48     $(INSTALL) -d $(DESTDIR)/$(CONFDDIR)
49     $(INSTALL) -d $(DESTDIR)/$(BINDIR)
50     $(INSTALL) -d $(DESTDIR)/$(SBINDIR)
51     $(INSTALL) -d $(DESTDIR)/$(MCORE_LIBDIR)
52     $(INSTALL) -m0644 mcored.confd $(DESTDIR)/$(CONFDDIR)/mcored
53     $(INSTALL) -m0755 mcore-controld $(DESTDIR)/$(MCORE_LIBDIR)
54     $(LN) $(MCORE_LIBDIR)/mcore-controld $(DESTDIR)/$(SBINDIR)/mcore-controld
55    
56 niro 2232 clean: $(CLEANDIRS)
57     rm -f $(PROGS)
58     rm -f $(SCRIPTS)
59     rm -f $(FILES)
60    
61     $(SUBDIRS):
62     $(MAKE) -C $@
63    
64     $(INSTALLDIRS):
65     $(MAKE) -C $(@:install-%=%) install
66    
67     $(CLEANDIRS):
68     $(MAKE) -C $(@:clean-%=%) clean
69    
70    
71     .PHONY: $(SUBDIRS)
72     .PHONY: $(INSTALLDIRS)
73     .PHONY: $(CLEANDIRS)
74 niro 2251 .PHONY: install-common
75     .PHONY: install-client
76 niro 2475 .PHONY: install-control
77 niro 2142 .PHONY: all install clean