Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[multi-asic] Fixed systemd-sonic-generator for multi-asic #7954

Merged
merged 1 commit into from
Jul 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/systemd-sonic-generator/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
systemd-sonic-generator
ssg_test
debian/*
!debian/changelog
!debian/compat
Expand Down
21 changes: 20 additions & 1 deletion src/systemd-sonic-generator/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
CC=gcc
CFLAGS=-std=gnu99
CFLAGS=-std=gnu99 -D_GNU_SOURCE

CPP=g++
CPPFLAGS=-std=c++11 -D_GNU_SOURCE
LFLAGS=-lpthread -lboost_filesystem -lboost_system -lgtest

BINARY = systemd-sonic-generator
MAIN_TARGET = $(BINARY)_1.0.0_$(CONFIGURED_ARCH).deb
Expand All @@ -20,3 +24,18 @@ install: $(BINARY)
mkdir -p $(DESTDIR)/lib/systemd
mkdir -p $(DESTDIR)/lib/systemd/system-generators
cp ./systemd-sonic-generator $(DESTDIR)/lib/systemd/system-generators

.PHONY: test
test: ssg_test
./ssg_test

ssg_test: ssg-test.cc systemd-sonic-generator.o
$(CPP) $(CPPFLAGS) -o $@ $^ $(LFLAGS)

systemd-sonic-generator.o: systemd-sonic-generator.c
$(CC) $(CFLAGS) -D_SSG_UNITTEST -o $@ -c $^

clean:
rm -f ./systemd-sonic-generator
rm -f ./systemd-sonic-generator.o
rm -f ./ssg_test
1 change: 0 additions & 1 deletion src/systemd-sonic-generator/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ PACKAGEVERSION = $(VERSION)
dh $@

override_dh_auto_clean:
override_dh_auto_test:
override_dh_auto_build:
override_dh_auto_install:
make systemd-sonic-generator
Expand Down
Loading