Files
acrn-hypervisor/tools/acrnlog/Makefile
wenshelx 6ee9321bd8 security: Enable '-fpie -pie' options
To be sure acrn debug tools are position independent
and executable.

Tracked-On: #1122
Signed-off-by: wenshelx <wenshengx.wang@intel.com>
Acked-by: CHEN Gang <gang.c.chen@intel.com>
Acked-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2018-09-07 10:23:54 +08:00

21 lines
507 B
Makefile

OUT_DIR ?= .
CFLAGS += -fpie
LDFLAGS += -pie
all:
$(CC) -g acrnlog.c -o $(OUT_DIR)/acrnlog -lpthread $(CFLAGS) $(LDFLAGS)
cp acrnlog.service $(OUT_DIR)/acrnlog.service
clean:
rm -f $(OUT_DIR)/acrnlog
ifneq ($(OUT_DIR),.)
rm -f $(OUT_DIR)/acrnlog.service
endif
install: $(OUT_DIR)/acrnlog
install -d $(DESTDIR)/usr/bin
install -t $(DESTDIR)/usr/bin $(OUT_DIR)/acrnlog
install -d $(DESTDIR)/usr/lib/systemd/system
install -p -D -m 0644 $(OUT_DIR)/acrnlog.service $(DESTDIR)/usr/lib/systemd/system