mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
fix build error
This commit is contained in:
parent
a24b2255a2
commit
eb471d68ee
4 changed files with 26 additions and 21 deletions
23
Makefile
23
Makefile
|
@ -20,12 +20,12 @@
|
|||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
###################################################################################
|
||||
|
@ -45,7 +45,7 @@ V ?= 2
|
|||
# Common flags
|
||||
LDLIBS =
|
||||
CFLAGS += -I. -Iinclude -Iinclude/villas
|
||||
CFLAGS += -std=c11 -MMD -mcx16
|
||||
CFLAGS += -std=c11 -MMD -mcx16
|
||||
CFLAGS += -Wall -Werror -fdiagnostics-color=auto
|
||||
LDFLAGS += -L$(BUILDDIR)
|
||||
|
||||
|
@ -65,7 +65,7 @@ endif
|
|||
ifdef PROFILE
|
||||
CFLAGS += -pg
|
||||
LDFLAGS += -pg
|
||||
|
||||
|
||||
VARIANTS += profile
|
||||
endif
|
||||
|
||||
|
@ -73,10 +73,10 @@ ifdef COVERAGE
|
|||
CFLAGS += -fprofile-arcs -ftest-coverage
|
||||
LDFLAGS += --coverage
|
||||
LDLIBS += -lgcov
|
||||
|
||||
|
||||
LIB_LDFLAGS += -coverage
|
||||
LIB_LDLIBS += -gcov
|
||||
|
||||
|
||||
VARIANTS += coverage
|
||||
endif
|
||||
|
||||
|
@ -87,16 +87,21 @@ VARIANT = $(subst $(SPACE),-,$(strip $(VARIANTS)))
|
|||
BUILDDIR := $(BUILDDIR)/$(VARIANT)
|
||||
SRCDIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
|
||||
|
||||
VPATH = $(SRCDIR)
|
||||
|
||||
# Add git revision and build variant defines
|
||||
VERSION := $(shell git describe --tags --abbrev=0 --match v*)
|
||||
VERSION_NUM := $(shell VERSION=$(VERSION); echo $${VERSION:1})
|
||||
|
||||
ifdef CI
|
||||
VARIANT := $(VARIANT)-ci
|
||||
endif
|
||||
|
||||
GIT_REV := $(shell git rev-parse --short=7 HEAD)
|
||||
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
|
||||
GIT_REV := $(shell echo $${CI_COMMIT_SHA:0:7})
|
||||
GIT_BRANCH := $(CI_COMMIT_REF_NAME)
|
||||
else
|
||||
GIT_REV := $(shell git rev-parse --short=7 HEAD)
|
||||
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
|
||||
endif
|
||||
|
||||
# pkg-config dependencies
|
||||
PKGS = libconfig
|
||||
|
|
|
@ -10,12 +10,12 @@
|
|||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
###################################################################################
|
||||
|
@ -56,7 +56,7 @@ $(TARGETS): $(BUILDDIR)/villas-%: $(BUILDDIR)/src/%.o
|
|||
$(BUILDDIR)/villas-fpga: $(addprefix $(BUILDDIR)/src/,fpga-bench.o $(BENCH_OBJS))
|
||||
|
||||
# Compile executable objects
|
||||
$(BUILDDIR)/src/%.o: src/%.c $(BUILDDIR)/defines | $$(dir $$@)
|
||||
$(BUILDDIR)/src/%.o: src/%.c | $$(dir $$@)
|
||||
$(CC) $(SRC_CFLAGS) -c $< -o $@
|
||||
|
||||
# Build villas-shmem only with libvillas-ext (to ensure that libext contains everything needed)
|
||||
|
|
|
@ -10,12 +10,12 @@
|
|||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
###################################################################################
|
||||
|
@ -33,7 +33,7 @@ run-unit-tests: tests
|
|||
$(BUILDDIR)/unit-tests
|
||||
|
||||
# Compile
|
||||
$(BUILDDIR)/tests/unit/%.o: tests/unit/%.c $(BUILDDIR)/defines | $$(dir $$@)
|
||||
$(BUILDDIR)/tests/unit/%.o: tests/unit/%.c | $$(dir $$@)
|
||||
$(CC) $(TEST_CFLAGS) -c $< -o $@
|
||||
|
||||
# Link
|
||||
|
@ -46,8 +46,8 @@ endif
|
|||
|
||||
# Tests are not installed
|
||||
install-tests:
|
||||
|
||||
|
||||
clean-tests:
|
||||
rm -rf $(BUILDDIR)/tests $(BUILDDIR)/testsuite
|
||||
|
||||
.PHONY: unit-tests install-unit-tests clean-unit-tests run-unit-tests
|
||||
.PHONY: unit-tests install-unit-tests clean-unit-tests run-unit-tests
|
||||
|
|
|
@ -10,12 +10,12 @@
|
|||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# any later version.
|
||||
#
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
###################################################################################
|
||||
|
@ -33,7 +33,7 @@ ifeq ($(shell $(PKGCONFIG) libzmq; echo $$?),0)
|
|||
endif
|
||||
|
||||
# Compile executable objects
|
||||
$(BUILDDIR)/tools/%.o: tools/%.c $(BUILDDIR)/defines | $$(dir $$@)
|
||||
$(BUILDDIR)/tools/%.o: tools/%.c | $$(dir $$@)
|
||||
$(CC) $(TOOLS_CFLAGS) -c $< -o $@
|
||||
|
||||
# Link target executables
|
||||
|
@ -49,4 +49,4 @@ install-tools: $(TOOLS)
|
|||
install -m 0755 tools/villas.sh $(DESTDIR)$(PREFIX)/bin/villas
|
||||
install -m 0755 -D -t $(DESTDIR)$(PREFIX)/bin $(TOOLS)
|
||||
|
||||
.PHONY: tools clean-tools install-tools
|
||||
.PHONY: tools clean-tools install-tools
|
||||
|
|
Loading…
Add table
Reference in a new issue