-
Notifications
You must be signed in to change notification settings - Fork 4
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
Fix make/cmake and includes. #28
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,10 +18,8 @@ ROOTFS ?= $(DESTDIR)$(prefix) | |
|
||
OUT_DIR ?= . | ||
|
||
# must be kept in sync with latest version in debian/changelog and with SECUTILS_VERSION in CMakeLists.txt | ||
VERSION=1.0 | ||
# must be kept in sync with latest version in debian/changelog | ||
# PACKAGENAME=libsecutils | ||
# DIRNAME=$(PACKAGENAME)-$(VERSION) | ||
|
||
SHELL=bash # This is needed for supporting extended file name globbing | ||
|
||
|
@@ -57,12 +55,16 @@ endif | |
# Note: stuff for testing purposes should go here | ||
################################################################################ | ||
|
||
ifdef NDEBUG | ||
ifdef DEBUG | ||
DEBUG_FLAGS ?= -g -O0 | ||
# Add this to get some additional runtime checks. | ||
# Warning: it's incompatible with tools like Valgrind and you have to add it to the app using this lib too | ||
# DEBUG_FLAGS += -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all | ||
else | ||
DEBUG_FLAGS ?= -O2 | ||
override DEBUG_FLAGS += -DNDEBUG=1 | ||
else | ||
DEBUG_FLAGS ?= -g -O0 -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all # not every compiler(version) supports -Og | ||
endif | ||
|
||
override CFLAGS += $(DEBUG_FLAGS) -Wall -Woverflow -Wextra -Wswitch -Wmissing-prototypes -Wstrict-prototypes -Wformat -Wtype-limits -Wundef -Wconversion | ||
override CFLAGS += -Wno-shadow -Wno-conversion -Wno-sign-conversion -Wno-sign-compare -Wno-unused-parameter # TODO clean up code and enable -Wshadow -Wconversion -Wsign-conversion -Wsign-compare -Wunused-parameter | ||
override CFLAGS += -Wformat -Wformat-security -Wno-declaration-after-statement -Wno-vla # -Wpointer-arith -pedantic -DPEDANTIC # -Werror | ||
|
@@ -150,11 +152,13 @@ ifeq ($(COV_ENABLED), 1) | |
endif | ||
$(MAKE) COMPILE_TYPE=$(COMPILE_TYPE) build_only | ||
|
||
util: | ||
util: $(OUT_DIR)/$(OUTLIB) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. better: |
||
$(MAKE) -C util SECUTILS_USE_UTA="$(SECUTILS_USE_UTA)" \ | ||
CFLAGS="$(CFLAGS) $(LOCAL_CFLAGS)" LDFLAGS="$(LDFLAGS)" | ||
|
||
build_all: build util | ||
build_all: | ||
$(MAKE) build | ||
$(MAKE) util | ||
Comment on lines
+159
to
+161
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the advantage of this change? |
||
|
||
# Binary output target | ||
$(OUT_DIR)/$(OUTLIB).$(VERSION): $(OBJS) | ||
|
@@ -219,10 +223,10 @@ clean_uta: | |
$(OUT_DIR)/$(OUTLIB)* $(OUT_DIR)/util/$(OUTBIN) $(OUT_DIR)/util/icvutil.o | ||
|
||
clean: | ||
$(MAKE) -C util clean | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is inconsistent - |
||
rm -rf $(OUT_DIR)/$(OUTLIB)* $(OUT_DIR)/util/$(OUTBIN) $(BUILDDIR) | ||
|
||
clean_all: clean clean_deb | ||
$(MAKE) -C util clean | ||
rm -rf doc refman.pdf *.gcov reports | ||
|
||
doc: doc/html refman.pdf | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
/** | ||
/** | ||
* @file certstatus.c | ||
* | ||
* | ||
* @brief Certificate status checking using CRLs and/or OCSP | ||
* | ||
* @copyright Copyright (c) Siemens Mobility GmbH, 2021 | ||
* | ||
* @author David von Oheimb <[email protected]> | ||
* | ||
* This work is licensed under the terms of the Apache Software License | ||
* This work is licensed under the terms of the Apache Software License | ||
* 2.0. See the COPYING file in the top-level directory. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
|
@@ -28,7 +28,7 @@ | |
# include <certstatus/ocsp.h> | ||
#endif | ||
|
||
#include <operators.h> | ||
#include "secutils/operators.h" | ||
|
||
static unsigned int num_CDPs(const X509* cert) | ||
{ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that regarding
(N)DEBUG
,CMakeLists.txt
andMakefile
should remain consistent. InMakefile
it now reads