Skip to content

Commit 99d272a

Browse files
committed
blink1control-tool: update curl version, multi-arch build for MacOS
1 parent 1fddf43 commit 99d272a

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

blink1control-tool/Makefile

+11-7
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,9 @@ CC=gcc
6161
################# Mac OS X ##################################################
6262
ifeq "$(OS)" "macosx"
6363

64+
CURL_CFLAGS = -arch x86_64 -arch arm64
6465
CFLAGS += `curl-$(OS)/bin/curl-config --static-libs` `curl-$(OS)/bin/curl-config --cflags`
65-
#CFLAGS += -arch x86_64 -arch arm64
66+
CFLAGS += $(CURL_CFLAGS)
6667

6768
EXE=
6869

@@ -114,6 +115,8 @@ CFLAGS += -Wno-pointer-to-int-cast
114115
CFLAGS += -I json-parser
115116
JSFILES = json-parser/json.c
116117

118+
CURL_DIR=curl-7.78.0
119+
117120
#$(OBJS): %.o: %.c
118121
# $(CC) $(CFLAGS) -c $< -o $@
119122

@@ -125,18 +128,18 @@ msg:
125128
@echo "Building blink1control-tool for OS=$(OS) BLINK1_VERSION=$(BLINK1_VERSION)"
126129

127130
curl-setup:
128-
@echo "setting up curl..."
129-
#wget http://curl.haxx.se/download/curl-7.37.1.tar.gz
130-
tar xvzf curl-7.37.1.tar.gz
131-
cd curl-7.37.1 && ./configure --prefix=`pwd`/../curl-$(OS) --disable-shared --disable-ldap --without-zlib --without-libssh2 --without-ssl --disable-crypto-auth && $(MAKE) && $(MAKE) install
131+
@echo "setting up curl... $(CURL_VER)"
132+
# wget http://curl.haxx.se/download/curl-7.37.1.tar.gz
133+
tar xzf $(CURL_DIR).tar.gz
134+
cd $(CURL_DIR) && CFLAGS="$(CURL_CFLAGS)" ./configure --prefix=`pwd`/../curl-$(OS) --disable-shared --disable-ldap --without-zlib --without-libssh2 --without-ssl --disable-crypto-auth && $(MAKE) && $(MAKE) install
132135

133136
json-parser-setup:
134137
@echo "setting up json-parser"
135138
unzip json-parser.zip
136139

137140
depcheck:
138141
@echo "Checking if curl and json-parser are setup"
139-
@if [ ! -d curl-7.37.1 ] ; then \
142+
@if [ ! -d $(CURL_DIR) ] ; then \
140143
$(MAKE) curl-setup; \
141144
else \
142145
echo " curl set up"; \
@@ -164,7 +167,8 @@ clean:
164167

165168
distclean:
166169
$(MAKE) clean
167-
rm -rf curl-7.37.1
170+
rm -rf $(CURL_DIR)
168171
rm -rf json-parser
172+
rm -rf curl-$(OS)
169173

170174
FORCE:

blink1control-tool/curl-7.37.1.tar.gz

-3.89 MB
Binary file not shown.

blink1control-tool/curl-7.78.0.tar.gz

3.92 MB
Binary file not shown.

0 commit comments

Comments
 (0)