summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/Makefile4
-rw-r--r--firmware/Makefile.dfu6
-rw-r--r--firmware/scripts/usbstring.c4
3 files changed, 14 insertions, 0 deletions
diff --git a/firmware/Makefile b/firmware/Makefile
index f94800b..b5f92ae 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -569,6 +569,7 @@ clean_list :
$(REMOVE) .dep/*
$(REMOVE) include/compile.h
$(REMOVE) src/picc/usb_strings_app.h
+ $(REMOVE) scripts/usbstring
.PHONY: include/compile.h
include/compile.h:
@@ -577,6 +578,9 @@ include/compile.h:
$(USBSTRINGS): %.h : %.txt ./scripts/usbstring
cat $< | ./scripts/usbstring > $@
+scripts/usbstring: scripts/usbstring.c
+ gcc $^ -o $@
+
# Include the dependency files.
-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
diff --git a/firmware/Makefile.dfu b/firmware/Makefile.dfu
index ae98f1c..42d7bb1 100644
--- a/firmware/Makefile.dfu
+++ b/firmware/Makefile.dfu
@@ -542,14 +542,20 @@ clean_list :
$(REMOVE) .dep/*
$(REMOVE) src/picc/usb_strings_dfu.h
$(REMOVE) src/dfu/usb_strings_dfu.h
+ $(REMOVE) scripts/usbstring
.PHONY: include/compile.h
include/compile.h:
scripts/mkcompile_h > $@
+.PHONY:
$(USBSTRINGS): %.h : %.txt ./scripts/usbstring
cat $< | ./scripts/usbstring > $@
+scripts/usbstring: scripts/usbstring.c
+ gcc $^ -o $@
+
+
# Include the dependency files.
-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
diff --git a/firmware/scripts/usbstring.c b/firmware/scripts/usbstring.c
index 5348e66..5724b40 100644
--- a/firmware/scripts/usbstring.c
+++ b/firmware/scripts/usbstring.c
@@ -26,6 +26,8 @@
*/
#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -194,4 +196,6 @@ int main(int argc, char **argv)
printf("\t(struct usb_descriptor_header *) &string%d,\n", j);
printf("};\n\n");
printf("#endif /* _USB_STRINGS_H */\n");
+
+ exit(0);
}
personal git repositories of Harald Welte. Your mileage may vary