-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathMakefile
34 lines (29 loc) · 979 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
.DEFAULT_GOAL := all
YUBICOC := yubico-c
SRCDIR := OneTime
TARGET := OneTimeTests
CONFIGURATION := Debug
BUILD_TARGETS := clean build
CLEAN_TARGETS := clean
init:
git submodule update --init --recursive
# Building on MacOS $to_tool_file_cmd is empty
# sed -i '/#! \/bin\/sh/s|$|\n\nto_tool_file_cmd=func_convert_file_noop\n|' libtool
# https://lists.gnu.org/archive/html/bug-libtool/2012-03/msg00010.html
all:
cd ${YUBICOC} && \
autoreconf --install && \
./configure && \
head -n 1 libtool>libtool.tmp && \
echo ''>>libtool.tml && \
echo 'to_tool_file_cmd=func_convert_file_noop'>>libtool.tmp && \
tail -n +3 libtool>>libtool.tmp && \
mv libtool.tmp libtool && \
make
cd ${SRCDIR} && \
xcodebuild -project OneTime.xcodeproj -target ${TARGET} -configuration ${CONFIGURATION} ${BUILD_TARGETS}
clean:
cd ${YUBICOC} && \
make clean
cd ${SRCDIR} && \
xcodebuild -project OneTime.xcodeproj -target ${TARGET} -configuration ${CONFIGURATION} ${CLEAN_TARGETS}