Skip to content
This repository has been archived by the owner on Jul 12, 2019. It is now read-only.

Simplify build system. #1

Merged
merged 4 commits into from
Sep 4, 2016
Merged

Simplify build system. #1

merged 4 commits into from
Sep 4, 2016

Conversation

jdek
Copy link
Contributor

@jdek jdek commented Sep 4, 2016

CMake is definitely unneeded, it's massive, and yet another dependency. I've added a fairly simple makefile to replace it, and the install/uninstall scripts. I've also reverted the commits which vendor jack into this repo and patch it--this is very bad practise and shouldn't be in here.

p.s. looks like a cool project, I was contemplating writing a JACK driver for OSX to replace the old JACK driver which has long bitrot; but now I've found this, I'd be happy to help.

jdek added 3 commits September 4, 2016 00:45
This reverts commit 7d6f4db.

Signed-off-by: Josh de Kock <[email protected]>
This reverts commit d3e5fce.

Signed-off-by: Josh de Kock <[email protected]>
This reverts commit 61a2577.

Signed-off-by: Josh de Kock <[email protected]>
@@ -1 +0,0 @@
../../../build/src/captain-jack
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this is necessary, though in your version it's just ../../../build/captain-jack. Your stage step performs a build-in-source kind of environment which I try to stay away from.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind, I see what happened. install doesn't like symlinks. Hmm.. okay. Disregard this.

@jdek
Copy link
Contributor Author

jdek commented Sep 4, 2016

I've integrated your comments, and updated the PR.

@Qix-
Copy link
Owner

Qix- commented Sep 4, 2016

Here is the diff I got to, on top of this PR.

diff --git a/Makefile b/Makefile
index 03e0c40..3cf425a 100644
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,7 @@ CFLAGS_CJ  = -bundle -framework CoreAudio -framework CoreFoundation
 CFLAGS_CJD = -framework CoreFoundation
 DESTDIR     =
 PREFIX      = /usr/local
-PLUGINDIR  = /Library/Audio/Plug-Ins/HAL/
+PLUGINDIR  = /Library/Audio/Plug-Ins/HAL
 BUILDDIR    = build

 SRCS        = $(wildcard **/*.c)
@@ -52,10 +52,14 @@ clean:
 # Install
 .PHONY: stage
 stage: $(BUILDDIR)/captain-jack
-   install -m 0755 $(BUILDDIR)/captain-jack $(DRIVER_NAME)/Contents/MacOS/
+   mkdir -p $(DRIVER_NAME)/Contents/MacOS
+   install -m 0755 $(BUILDDIR)/captain-jack $(DRIVER_NAME)/Contents/MacOS/CaptainJack

 .PHONY: install
 install: $(BUILDDIR)/captain-jack-daemon stage
+   sudo mkdir -p $(DESTDIR)$(PLUGINDIR)/$(DRIVER_NAME)/Contents/MacOS
+   sudo mkdir -p $(DESTDIR)$(PLUGINDIR)/$(DRIVER_NAME)/Contents/Resources
+   sudo mkdir -p $(DESTDIR)$(PLUGINDIR)/$(DRIVER_NAME)/Contents/Resources/English.lproj
    sudo install -m 0755 -o root -g wheel $(BUILDDIR)/captain-jack-daemon $(DESTDIR)$(PREFIX)/sbin
    sudo install -m 0644 -o root -g wheel $(DRIVER_NAME)/Contents/Info.plist $(DESTDIR)$(PLUGINDIR)/$(DRIVER_NAME)/Contents/Info.plist
    sudo install -m 0755 -o root -g wheel $(DRIVER_NAME)/Contents/MacOS/CaptainJack $(DESTDIR)$(PLUGINDIR)/$(DRIVER_NAME)/Contents/MacOS/CaptainJack
@@ -71,7 +75,7 @@ uninstall: stop

 .PHONY: kill_audio
 kill_audio:
-   ps aux | grep _coreaudiod | grep -v grep | awk '{print $2}' | xargs sudo kill -9
+   ps aux | grep _coreaudiod | grep -v grep | awk '{print $$2}' | xargs sudo kill -9

 .PHONY: stop
 stop: kill_audio

CMake is a silly amount of unneeded baggage for such a simple project.

Signed-off-by: Josh de Kock <[email protected]>
@jdek
Copy link
Contributor Author

jdek commented Sep 4, 2016

Ok. Take two.

@Qix-
Copy link
Owner

Qix- commented Sep 4, 2016

Perfect, there we go :) I'm okay with this. I normally prefer CMake because I like Ninja, but I'm okay to do without it for now.

I also don't mind building against the system jack installation, even though that doesn't seem to work well right now.

@Qix- Qix- merged commit f869379 into Qix-:master Sep 4, 2016
@jdek
Copy link
Contributor Author

jdek commented Sep 4, 2016

If the project becomes a lot more complex (with many more components), then it might make sense to switch back to CMake,

Unrelated (didn't think it warranted a separate issue): Could you add a README stating how to actually use this?

@Qix-
Copy link
Owner

Qix- commented Sep 4, 2016

Yeah I can; It's still under development so the next phase is to actually wire it up to JACK.

Give me a few minutes.

@Qix-
Copy link
Owner

Qix- commented Sep 4, 2016

@joshdekock Added an initial readme. As I said it's still under development.

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

Successfully merging this pull request may close these issues.

2 participants