Files
OpenCellular/extra/rma_reset/Makefile
Mary Ruthven e33c1d8de0 rma_reset: update Makefile to use different compiliers
BUG=b:76105747
BRANCH=none
TEST=compile for bob and reef. make sure it runs on both

Change-Id: I30004c9794c9619698889fecbf8746778ebbb48c
Signed-off-by: Mary Ruthven <mruthven@google.com>
Reviewed-on: https://chromium-review.googlesource.com/976554
Commit-Ready: Mary Ruthven <mruthven@chromium.org>
Tested-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
2018-03-22 20:53:25 -07:00

53 lines
1.4 KiB
Makefile

# Copyright 2017 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
CC ?= gcc
PROGRAM := rma_reset
SOURCE := $(PROGRAM).c
OBJS := curve25519.o curve25519-generic.o sha256.o base32.o
LIBS :=
LFLAGS :=
CFLAGS := -std=gnu99 \
-g3 \
-O3 \
-Wall \
-Werror \
-Wpointer-arith \
-Wcast-align \
-Wcast-qual \
-Wundef \
-Wsign-compare \
-Wredundant-decls \
-Wmissing-declarations
#
# Add libusb-1.0 required flags
#
INCLUDE=-I. -I../../ -I../../test -I../../include -I../../chip/host
LIBS += -lcrypto -lssl
CFLAGS += ${INCLUDE}
STANDALONE_FLAGS=${INCLUDE} -ffreestanding -fno-builtin \
-Ibuiltin/ -D"__keep= "
$(PROGRAM): $(SOURCE) $(OBJS) Makefile
$(CC) $(CFLAGS) $(SOURCE) $(LFLAGS) $(LIBS) $(OBJS) -o $@
curve25519-generic.o: ../../common/curve25519-generic.c
$(CC) $(STANDALONE_FLAGS) -c -o curve25519-generic.o \
../../common/curve25519-generic.c
curve25519.o: ../../common/curve25519.c
$(CC) $(STANDALONE_FLAGS) -c -o curve25519.o ../../common/curve25519.c
sha256.o: ../../common/sha256.c
$(CC) $(STANDALONE_FLAGS) -c -o sha256.o ../../common/sha256.c
base32.o: ../../common/base32.c
$(CC) $(STANDALONE_FLAGS) -c -o base32.o ../../common/base32.c
.PHONY: clean
clean:
rm -rf *.o $(PROGRAM) *~