3 ifeq ($(BUILD_SHUTDOWN),yes)
7 dinit_objects = dinit.o load-service.o service.o proc-service.o baseproc-service.o control.o dinit-log.o \
8 dinit-main.o run-child-proc.o
10 objects = $(dinit_objects) dinitctl.o shutdown.o
12 all: dinit dinitctl $(SHUTDOWN)
14 includes/mconfig.h: mconfig-gen
15 ./mconfig-gen SBINDIR=$(SBINDIR) SYSCONTROLSOCKET=$(SYSCONTROLSOCKET) > includes/mconfig.h
17 mconfig-gen: mconfig-gen.cc ../mconfig
18 $(CXX) $(CXXOPTS) -o mconfig-gen mconfig-gen.cc $(LDFLAGS)
20 dinit: includes/mconfig.h $(dinit_objects)
21 $(CXX) -o dinit $(dinit_objects) $(LDFLAGS)
24 $(CXX) -o dinitctl dinitctl.o $(LDFLAGS)
27 $(CXX) -o shutdown shutdown.o $(LDFLAGS)
30 $(CXX) $(CXXOPTS) -MMD -MP -Iincludes -Idasynq -c $< -o $@
33 $(MAKE) -C tests check
36 cppcheck --std=c++11 -Iincludes -Idasynq --force --enable=all *.cc 2>../cppcheck-report.txt
39 install -d $(DESTDIR)$(SBINDIR)
40 install -s dinit dinitctl $(SHUTDOWN) $(DESTDIR)$(SBINDIR)
41 ifeq ($(BUILD_SHUTDOWN),yes)
42 install halt reboot $(DESTDIR)$(SBINDIR)
47 rm -f dinit dinitctl shutdown mconfig-gen
48 rm -f includes/mconfig.h
49 $(MAKE) -C tests clean
51 -include $(objects:.o=.d)