Skip to content

Commit

Permalink
macOS: add target to create a fsequtils zip
Browse files Browse the repository at this point in the history
  • Loading branch information
dkulp committed Nov 10, 2023
1 parent 77c743a commit 1faec25
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ src/Makefile.local
src/libfpp*.so
src/libFalconV5.so
src/libfpp*.dylib
src/fsequtils.zip
src/libjson*.dylib
cscope.out
tags
pixelnetDMX
Expand Down
16 changes: 16 additions & 0 deletions src/makefiles/fsequtils.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,17 @@ OBJECTS_fsequtils = \
fseq/FSEQUtils.o \
fseq/FSEQFile.o

ifeq '$(ARCH)' 'OSX'
LIBS_fsequtils = \
-lcurl \
-ljsoncpp \
-lz $(HOMEBREW)/opt/zstd/lib/libzstd.a
else
LIBS_fsequtils = \
-lcurl \
-ljsoncpp \
-lzstd -lz
endif

TARGETS += fsequtils
OBJECTS_ALL+=$(OBJECTS_fsequtils)
Expand All @@ -19,3 +26,12 @@ fsequtils: $(OBJECTS_fsequtils) $(PCH_FILE)

fseq/%.o: fseq/%.cpp fseq/%.h fppversion_defines.h Makefile makefiles/*.mk makefiles/platform/*.mk
$(CCACHE) $(CXXCOMPILER) $(CFLAGS) $(CXXFLAGS) $(CXXFLAGS_$@) -c $(SRCDIR)$< -o $@

ifeq '$(ARCH)' 'OSX'
OBJECTS_ALL+=libjsoncpp.25.dylib fsequtils.zip
fsequtils.zip: fsequtils
cp $(HOMEBREW)/opt/jsoncpp/lib/libjsoncpp.25.dylib .
chmod +w libjsoncpp.25.dylib
install_name_tool -change $(HOMEBREW)/opt/jsoncpp/lib/libjsoncpp.25.dylib ./libjsoncpp.25.dylib fsequtils
zip -9 fsequtils.zip fsequtils libjsoncpp.25.dylib
endif

0 comments on commit 1faec25

Please sign in to comment.