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

Updated Makefile to be more friendly for distro packaging #143

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yarda
Copy link

@yarda yarda commented Jul 11, 2021

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
Copy link
Author

@yarda yarda Jul 11, 2021

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) \
Copy link
Author

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); \
Copy link
Author

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)
Copy link
Author

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).

@yarda
Copy link
Author

yarda commented Jul 11, 2021

FYI we are trying to get the package into Fedora:
https://bugzilla.redhat.com/show_bug.cgi?id=1981103

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant