Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

add install #31

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
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
11 changes: 11 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,14 @@ jobs:
cd ${GITHUB_WORKSPACE}/integrationTest
make clean-all > /dev/null
./run.sh

- name: Install Runtime
run: |
cd ${GITHUB_WORKSPACE}
git submodule update --init
cd ${GITHUB_WORKSPACE}/runtime
make clean-all
make -j10
sudo make install
cd ${GITHUB_WORKSPACE}/sample
make sampleApplication_system
12 changes: 11 additions & 1 deletion runtime/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,16 @@ clean:

clean-all: clean
rm -f libgtest.a testHelper/GeneratedCode.cc


ifeq ($(PREFIX),)
PREFIX := /usr/local
endif
install: libNanoLog.a
install -d $(DESTDIR)$(PREFIX)/lib/
install -m 644 libNanoLog.a $(DESTDIR)$(PREFIX)/lib/
install -d $(DESTDIR)$(PREFIX)/include/NanoLog/
install -m 644 *.h $(DESTDIR)$(PREFIX)/include/NanoLog/
install -m 755 decompressor $(DESTDIR)$(PREFIX)/bin/
# Automatic rules to build *.h dependencies. Taken from
# https://stackoverflow.com/questions/2394609/makefile-header-dependencies
depend: .depend
Expand All @@ -74,3 +83,4 @@ depend: .depend
$(CXX) $(CXX_ARGS) $(INCLUDES) -MM $^ > ./.depend;

include .depend

6 changes: 6 additions & 0 deletions sample/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,9 @@ decompressor: libNanoLog.a
clean-all: clean
@rm -f libNanoLog.a decompressor
$(MAKE) clean-all -C $(NANOLOG_RUNTIME_DIR)

main-install.o: main.cc
$(CXX) -I /usr/local/include/NanoLog/ -c -o $@ $< $(CXXFLAGS)

sampleApplication_system: main-install.o
$(CXX) $(CXXFLAGS) -o sampleApplication main-install.o -L/usr/local/lib/ -lNanoLog -pthread -lrt