-
Notifications
You must be signed in to change notification settings - Fork 13
General rework for Yocto Project integration #2
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
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 |
|---|---|---|
|
|
@@ -4,23 +4,33 @@ | |
| # SPDX-License-Identifier: GPL-2.0-or-later | ||
| #============================================================================== | ||
|
|
||
| CC = gcc | ||
| CC ?= gcc | ||
| CFLAGS ?= -g -Wall -Werror | ||
| CPPFLAGS ?= | ||
| LDFLAGS ?= | ||
| INCLUDES = -I../inc/ | ||
|
|
||
| COPTS = -g -Wall -Werror | ||
| CFLAGS = -I../inc/. | ||
| PREFIX ?= /usr/local | ||
| BINDIR ?= $(PREFIX)/bin | ||
| DATADIR ?= $(PREFIX)/share | ||
|
|
||
| DEPS = cst_signer.h cfg_parser.h mkimage_helper.h | ||
| SRCS = cst_signer.c cfg_parser.c mkimage_helper.c fdt.o | ||
| SRCS = cst_signer.c cfg_parser.c mkimage_helper.c fdt.c | ||
|
|
||
| .PHONY: all clean | ||
| all: cst-signer | ||
|
|
||
| all: cst_signer fdt.o | ||
| %.o : %.c | ||
| $(CC) -c $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(CPPFLAGS) $< -o $@ | ||
|
|
||
| fdt.o: fdt.c | ||
| $(CC) -c -w -o $@ $< $(CFLAGS) | ||
| cst-signer: $(SRCS:.c=.o) | ||
| $(CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(CPPFLAGS) -o $@ $(SRCS:.c=.o) | ||
|
|
||
| cst_signer: cst_signer.c fdt.o | ||
| $(CC) $(COPTS) $(CFLAGS) -o $@ $(SRCS) | ||
| install: cst-signer | ||
| install -D -m 0755 cst-signer $(DESTDIR)/$(BINDIR)/cst-signer | ||
| install -D -m 0755 -t $(DESTDIR)$(DATADIR)/doc/cst-signer \ | ||
|
Contributor
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. I do not understand the usage of doc folder here. maybe its something I am not familiar with possibly autotools related?
Author
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. The .sample configuration files go to /usr/share/doc/ as for target packages. Here for example I generated: I understand that you use those files as templates, but in this particular case, it should be done in the native recipe. In my recipe I did this as well. |
||
| ../csf_ahab.cfg.sample \ | ||
| ../csf_hab4.cfg.sample | ||
|
|
||
| clean: | ||
| rm -rf cst_signer fdt.o | ||
| rm -rf cst-signer *.o | ||
|
Contributor
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. Shouldnt DESTDIR be cleaned as well?
Author
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. No, 'clean' is not an uninstall target. |
||
|
|
||
| .PHONY: all install clean | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,7 @@ | |
| * | ||
| */ | ||
|
|
||
| #include "cfg_parser.h" | ||
| #include <cfg_parser.h> | ||
|
|
||
| #define DELIMITER "=" | ||
|
|
||
|
|
||
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.
Currently my yocto scripts are pulling cst-singer binary and csf config files from home directory of cst-signer tool. I will not be able to apply this change in this release.
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.
It is recommended to use /usr/local for manually built applications, and /usr for packaged tools. The home directory is not suitable for this purpose.