fault/fm-mgr/sources/Makefile
Dan Voiculeasa be2ceec7a9 Rework fm-mgr Makefile and spec
Move service installation out of the Makefile.
This will let Debian build system control the service installation.

Test on CentOS:
PASS: build-pkgs && build-iso
PASS: install iso & fminit service exists
PASS: bootstrap & unlock

Story: 2009101
Task: 44321
Change-Id: I244c078b19fb0817fcd9ac3c2b026a32024dd1c9
Signed-off-by: Dan Voiculeasa <dan.voiculeasa@windriver.com>
2022-04-09 16:32:24 +00:00

37 lines
864 B
Makefile
Executable File

SRCS = fm_main.cpp
OBJS = fm_main.o
OBJS = $(SRCS:.cpp=.o)
INCLUDES = -I.
CCFLAGS = -g -O2 -Wall -Werror
EXTRACCFLAGS = -Wformat -Wformat-security
MAJOR ?= 1
MINOR ?= 0
DESTDIR ?= /
BINDIR ?= /usr/local/bin
SYSCONFDIR ?= /etc
build: fmManager
.cpp.o:
$(CXX) $(INCLUDES) $(CCFLAGS) $(EXTRACCFLAGS) -c $< -o $@
fmManager: $(OBJS)
$(CXX) -o $@ $(OBJS) $(LDFLAGS) -lfmcommon -lrt -lpthread -luuid
clean:
@rm -f $(OBJS)
install:
mkdir -p $(DESTDIR)/usr/lib/systemd/system
install -m 755 -d $(DESTDIR)$(SYSCONFDIR)
install -m 755 -d $(DESTDIR)$(SYSCONFDIR)/init.d
install -m 755 -d $(DESTDIR)$(SYSCONFDIR)/logrotate.d
install -m 755 -d $(DESTDIR)$(BINDIR)
install -m 755 fminit $(DESTDIR)$(SYSCONFDIR)/init.d/fminit
install -m 755 fmManager $(DESTDIR)$(BINDIR)/fmManager
install -m 644 fm.logrotate $(DESTDIR)$(SYSCONFDIR)/logrotate.d/fm.logrotate