1# Makefile --- Instructions for make to build YubiKey library and tools.
2#
3# Written by Simon Josefsson <simon@josefsson.org>.
4# Copyright (c) 2006-2012 Yubico AB
5# All rights reserved.
6#
7# Redistribution and use in source and binary forms, with or without
8# modification, are permitted provided that the following conditions are
9# met:
10#
11#    * Redistributions of source code must retain the above copyright
12#      notice, this list of conditions and the following disclaimer.
13#
14#    * Redistributions in binary form must reproduce the above
15#      copyright notice, this list of conditions and the following
16#      disclaimer in the documentation and/or other materials provided
17#      with the distribution.
18#
19# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
31CFLAGS = -I. -Wall -g
32
33PROGRAMS = modhex ykparse tests/selftest ykgenerate
34
35all: $(PROGRAMS)
36
37$(PROGRAMS): yktoken.o ykmodhex.o ykhex.o ykcrc.o ykaes.o yubikey.h
38
39clean:
40	rm -f $(PROGRAMS) *~ *.o
41
42check: all
43	tests/selftest
44
45zip:
46	zip yubico-sdk-`date +%Y-%m-%d` \
47		COPYING README Makefile.simple yubikey.h yubikey.c tests/selftest.c modhex.c ykparse.c ykgenerate.c
48