summaryrefslogtreecommitdiff
path: root/extra/usb_updater/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'extra/usb_updater/Makefile')
-rw-r--r--extra/usb_updater/Makefile28
1 files changed, 3 insertions, 25 deletions
diff --git a/extra/usb_updater/Makefile b/extra/usb_updater/Makefile
index 2f8f70a6d3..1dfbc55645 100644
--- a/extra/usb_updater/Makefile
+++ b/extra/usb_updater/Makefile
@@ -4,7 +4,7 @@
CC ?= gcc
PKG_CONFIG ?= pkg-config
-PROGRAMS := gsctool usb_updater2
+PROGRAMS := usb_updater2
LIBS :=
LFLAGS :=
CFLAGS := -std=gnu99 \
@@ -34,27 +34,12 @@ CFLAGS += -I../../include -I../../util -I../../fuzz -I../../test
VPATH = ../../util
-BOARD := cr50
-LIBS_g = $(shell $(PKG_CONFIG) --libs libcrypto)
-CFLAGS_g = $(shell $(PKG_CONFIG) --cflags libcrypto)
-CFLAGS_g += -I../../board/cr50 -I ../../chip/g
-
LIBS_common = -lfmap
all: $(PROGRAMS)
-GSCTOOL_SOURCES := gsctool.c desc_parser.c usb_if.c verify_ro.c
-GSCTOOL_OBJS := $(patsubst %.c,%.o,$(GSCTOOL_SOURCES))
-DEPS := $(patsubst %.c,%.d,$(GSCTOOL_SOURCES))
-
-# chip/g updater
-gsctool: $(GSCTOOL_OBJS) Makefile
- $(CC) $(GSCTOOL_OBJS) $(LFLAGS) $(LIBS) $(LIBS_g) -o $@
-
%.o: %.c
- $(CC) $(CFLAGS) $(CFLAGS_g) -c -MMD -MF $(basename $@).d -o $@ $<
-
-gsctool.o: generated_version.h
+ $(CC) $(CFLAGS) -c -MMD -MF $(basename $@).d -o $@ $<
# common EC code USB updater
usb_updater2: usb_updater2.c Makefile
@@ -62,16 +47,9 @@ usb_updater2: usb_updater2.c Makefile
.PHONY: clean
-generated_version.h: $(GSCTOOL_SOURCES)
- # Make sure ${BOARD} not set to anything when invoking getversion.sh,
- # as even when building with Cr50 enabled, other directories do not
- # matter for gsctool.
- @(cd ../../; BOARD= util/getversion.sh) > $@
-
clean:
- rm -rf $(PROGRAMS) *~ *.o *.d dp generated_version.h
+ rm -rf $(PROGRAMS) *~ *.o *.d dp
parser_debug: desc_parser.c
gcc -g -O0 -DTEST_PARSER desc_parser.c -o dp
--include $(DEPS)