mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-10 17:41:54 +00:00
For some reason the default linker does not find libftdi1 anymore.
Other Chrome OS packages linking to this library still build just
fine, it turns out they are using the default gcc for linking.
Let's do the same for building tpmtest library.
BRANCH=none
BUG=none
TEST=the following sequence now works fine:
cd test/tmp_test
touch *
make
and the resulting library allows to successfully run TPM tests on
the b1 board.
Change-Id: I10fe51a4747a3527b500d3255d8347e6a689c345
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/327065
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
57 lines
1.1 KiB
Makefile
57 lines
1.1 KiB
Makefile
# Copyright 2015 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.
|
|
|
|
ifeq ($(V),)
|
|
Q := @
|
|
else
|
|
Q :=
|
|
endif
|
|
|
|
obj = ../../build/tpm_test
|
|
src = .
|
|
SWIG = /usr/bin/swig
|
|
|
|
CFLAGS = -fPIC
|
|
CFLAGS += -I /usr/include/python2.7
|
|
CFLAGS += -DLIBFTDI1=1
|
|
CFLAGS += -c
|
|
|
|
TARGET = ftdi_spi_tpm
|
|
.PRECIOUS: $(obj)/ftdi_spi_tpm_wrap.c
|
|
|
|
$(obj)/_$(TARGET).so:
|
|
|
|
OBJS = $(obj)/$(TARGET).o $(obj)/$(TARGET)_wrap.o $(obj)/mpsse.o \
|
|
$(obj)/support.o
|
|
|
|
DEPS := $(OBJS:.o=.o.d)
|
|
|
|
$(OBJS): | $(obj)
|
|
|
|
$(obj)/%.o: $(obj)/%.c
|
|
@echo " CC $(notdir $@)"
|
|
$(Q)gcc $(CFLAGS) -o $@ $<
|
|
|
|
$(obj)/%.o: $(src)/%.c
|
|
@echo " CC $(notdir $@)"
|
|
$(Q)gcc $(CFLAGS) -Wall -Werror -MMD -MF $@.d -o $@ $<
|
|
|
|
$(obj)/_$(TARGET).so: $(OBJS) $(obj)/$(TARGET).py
|
|
@echo " LD $(notdir $@)"
|
|
$(Q)rm -f $@
|
|
$(Q)gcc -shared $(OBJS) -lftdi1 -o $@
|
|
|
|
$(obj)/%_wrap.c: $(src)/%.i
|
|
@echo " SWIG $(notdir $@)"
|
|
$(Q)swig -python -outdir $(obj) -o $@ $<
|
|
|
|
clean:
|
|
@rm -rf $(obj)/
|
|
|
|
$(obj):
|
|
@echo " MKDIR $(obj)"
|
|
$(Q)mkdir -p $(obj)
|
|
|
|
-include $(DEPS)
|