-
Notifications
You must be signed in to change notification settings - Fork 72
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
Updated Makefile to be more friendly for distro packaging #143
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Jaroslav Škarvada <[email protected]>
@@ -2,6 +2,9 @@ | |||
GIT_DATE := $(firstword $(shell git --no-pager show --date=short --format="%ai" --name-only)) | |||
GIT_VERSION := $(shell git describe --abbrev=0 --tags) | |||
|
|||
PREFIX=/usr/local |
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.
Allow PREFIX, BINDIR, DESTDIR override.
@@ -397,7 +400,7 @@ protocols.o | |||
$(PROGRAM): $(OBJS) $(REMOTE_OBJS) $(USBOZY_OBJS) $(SOAPYSDR_OBJS) \ | |||
$(LOCALCW_OBJS) $(GPIO_OBJS) $(PURESIGNAL_OBJS) \ | |||
$(MIDI_OBJS) $(STEMLAB_OBJS) $(SERVER_OBJS) | |||
$(LINK) -o $(PROGRAM) $(OBJS) $(REMOTE_OBJS) $(USBOZY_OBJS) $(GPIO_OBJS) \ | |||
$(LINK) -o $(PROGRAM) $(LDFLAGS) $(OBJS) $(REMOTE_OBJS) $(USBOZY_OBJS) $(GPIO_OBJS) \ |
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.
Support distro LDFLAGS.
@@ -436,7 +439,8 @@ clean: | |||
|
|||
.PHONY: install | |||
install: $(PROGRAM) | |||
cp $(PROGRAM) /usr/local/bin | |||
mkdir -p $(BINDIR); \ |
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.
Make target dir, use variables, support parallel build.
@@ -436,7 +439,8 @@ clean: | |||
|
|||
.PHONY: install | |||
install: $(PROGRAM) | |||
cp $(PROGRAM) /usr/local/bin | |||
mkdir -p $(BINDIR); \ | |||
cp -a $(PROGRAM) $(BINDIR) |
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.
Preserve built timestamp (maybe better to use install command).
FYI we are trying to get the package into Fedora: |
Signed-off-by: Jaroslav Škarvada [email protected]