Makefile (1312B)
1 # This makefile should not be used directly. 2 # It should always be called from ../Makefile 3 default: 4 $(MAKE) -C .. macui 5 .PHONY: default 6 7 # Note: The OCaml library names changed starting with OCaml 5.1.0 8 .PHONY: macexecutable 9 macexecutable: 10 ( \ 11 LIB_SUFFIX=$$(ocaml -e 'if Sys.ocaml_release.major > 5 || Sys.ocaml_release.major = 5 && Sys.ocaml_release.minor >= 1 then print_string "nat"' 2> /dev/null); \ 12 printf "MARKETING_VERSION = $(VERSION)\nOCAMLLIBDIR = $(OCAMLLIBDIR)\nOCAMLLIB_UNIX = -lunix$${LIB_SUFFIX}\nOCAMLLIB_STR = -lcamlstr$${LIB_SUFFIX}" > ExternalSettings.xcconfig) 13 xcodebuild $(XCODEFLAGS) SYMROOT=build 14 $(CC) $(CFLAGS) cltool.c -o build/Default/Unison.app/Contents/MacOS/cltool -framework Carbon 15 codesign --remove-signature build/Default/Unison.app 16 codesign --force --sign - build/Default/Unison.app/Contents/MacOS/cltool 17 codesign --force --sign - --entitlements build/uimac*.build/Default/uimac.build/Unison.app.xcent build/Default/Unison.app 18 codesign --verify --deep --strict build/Default/Unison.app 19 # cltool was added into the .app after it was signed, so the signature is now 20 # broken. It must be removed, cltool separately signed, and then the entire 21 # .app (re-)signed. 22 23 .PHONY: clean 24 clean: 25 xcodebuild clean 2> /dev/null || true 26 -rm -f -r build ExternalSettings.xcconfig