summaryrefslogtreecommitdiff
path: root/v4l/firmware/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'v4l/firmware/Makefile')
-rw-r--r--v4l/firmware/Makefile30
1 files changed, 24 insertions, 6 deletions
diff --git a/v4l/firmware/Makefile b/v4l/firmware/Makefile
index c3624004c..e018ad92a 100644
--- a/v4l/firmware/Makefile
+++ b/v4l/firmware/Makefile
@@ -1,27 +1,45 @@
-TARGETS = ihex2fw ttusb-budget vicam.fw dabusb_bitstream dabusb.fw stv0672_v4
+DIRS = vicam dabusb ttusb-budget cpia2
+
+TARGETS = ihex2fw vicam/firmware.fw dabusb/firmware.fw dabusb/bitstream.bin ttusb-budget/dspbootcode.bin cpia2/stv0672_vp4.bin
+
+####
default: $(TARGETS)
clean:
-rm $(TARGETS)
+distclean: clean
+ -rmdir $(DIRS)
+
+install: default
+ -for i in $(DIRS); do mkdir /lib/firmware/$$i; done
+ -for i in $(TARGETS); do cp $$i /lib/firmware/$$i; done
+
+
+######
+
+mkdir:
+ -mkdir $(DIRS)
+
ihex2fw: ../../linux/firmware/ihex2fw.c
gcc -Wall -o $@ $<
-vicam.fw: ../../linux/firmware/vicam/firmware.H16
+vicam/firmware.fw: ../../linux/firmware/vicam/firmware.H16 mkdir
+ -mkdir vicam
./ihex2fw -w $< $@
-dabusb.fw: ../../linux/firmware/dabusb/firmware.HEX
+dabusb/firmware.fw: ../../linux/firmware/dabusb/firmware.HEX mkdir
./ihex2fw $< $@
-ttusb-budget: ../../linux/firmware/ttusb-budget/dspbootcode.bin.ihex
+ttusb-budget/dspbootcode.bin: ../../linux/firmware/ttusb-budget/dspbootcode.bin.ihex mkdir
objcopy -Iihex -Obinary $< $@
-dabusb_bitstream: ../../linux/firmware/dabusb/bitstream.bin.ihex
+dabusb/bitstream.bin: ../../linux/firmware/dabusb/bitstream.bin.ihex mkdir
objcopy -Iihex -Obinary $< $@
-stv0672_v4: ../../linux/firmware/cpia2/stv0672_vp4.bin.ihex
+cpia2/stv0672_vp4.bin: ../../linux/firmware/cpia2/stv0672_vp4.bin.ihex mkdir
objcopy -Iihex -Obinary $< $@