source: rtems-libbsd/Makefile.todo @ 20fa599

5-freebsd-12
Last change on this file since 20fa599 was 20fa599, checked in by Christian Mauderer <Christian.Mauderer@…>, on Nov 18, 2016 at 10:11:27 AM

firmware-gen.py: Add script to generate firmware c files.

  • Property mode set to 100644
File size: 4.4 KB
Line 
1LOCAL_INC = rtemsbsd/include/rtems/bsd/local
2
3LOCAL_SRC = rtemsbsd/local
4
5FREEBSD_SRC = freebsd-org
6
7TOOLS = freebsd-org/sys/tools
8
9GENERATED =
10GENERATED += $(LOCAL_INC)/usb_if.h
11GENERATED += $(LOCAL_SRC)/usb_if.c
12GENERATED += $(LOCAL_INC)/bus_if.h
13GENERATED += $(LOCAL_SRC)/bus_if.c
14GENERATED += $(LOCAL_INC)/device_if.h
15GENERATED += $(LOCAL_SRC)/device_if.c
16GENERATED += $(LOCAL_INC)/usbdevs_data.h
17GENERATED += $(LOCAL_INC)/usbdevs.h
18GENERATED += $(LOCAL_INC)/miibus_if.h
19GENERATED += $(LOCAL_SRC)/miibus_if.c
20GENERATED += $(LOCAL_INC)/miidevs.h
21GENERATED += $(LOCAL_INC)/pci_if.h
22GENERATED += $(LOCAL_SRC)/pci_if.c
23GENERATED += $(LOCAL_INC)/pcib_if.h
24GENERATED += $(LOCAL_SRC)/pcib_if.c
25GENERATED += $(LOCAL_INC)/mmcbr_if.h
26GENERATED += $(LOCAL_SRC)/mmcbr_if.c
27GENERATED += $(LOCAL_INC)/mmcbus_if.h
28GENERATED += $(LOCAL_SRC)/mmcbus_if.c
29GENERATED += $(LOCAL_SRC)/urtwn-rtl8192cfwT.fw.c
30
31all: $(GENERATED)
32
33$(LOCAL_INC)/usbdevs.h: $(FREEBSD_SRC)/sys/dev/usb/usbdevs
34        awk -f $(TOOLS)/usbdevs2h.awk $< -h
35        mv usbdevs.h $@
36
37$(LOCAL_INC)/usbdevs_data.h: $(FREEBSD_SRC)/sys/dev/usb/usbdevs
38        awk -f $(TOOLS)/usbdevs2h.awk $< -d
39        mv usbdevs_data.h $@
40
41$(LOCAL_INC)/usb_if.h: $(FREEBSD_SRC)/sys/dev/usb/usb_if.m
42        awk -f $(TOOLS)/makeobjops.awk $< -h
43        mv usb_if.h $@
44
45$(LOCAL_SRC)/usb_if.c: $(FREEBSD_SRC)/sys/dev/usb/usb_if.m
46        awk -f $(TOOLS)/makeobjops.awk $< -c
47        mv usb_if.c $@
48
49$(LOCAL_INC)/bus_if.h: $(FREEBSD_SRC)/sys/kern/bus_if.m
50        awk -f $(TOOLS)/makeobjops.awk $< -h
51        mv bus_if.h $@
52
53$(LOCAL_SRC)/bus_if.c: $(FREEBSD_SRC)/sys/kern/bus_if.m
54        awk -f $(TOOLS)/makeobjops.awk $< -c
55        mv bus_if.c $@
56
57$(LOCAL_INC)/device_if.h: $(FREEBSD_SRC)/sys/kern/device_if.m
58        awk -f $(TOOLS)/makeobjops.awk $< -h
59        mv device_if.h $@
60
61$(LOCAL_SRC)/device_if.c: $(FREEBSD_SRC)/sys/kern/device_if.m
62        awk -f $(TOOLS)/makeobjops.awk $< -c
63        mv device_if.c $@
64
65$(LOCAL_INC)/miidevs.h: $(FREEBSD_SRC)/sys/dev/mii/miidevs
66        awk -f $(TOOLS)/miidevs2h.awk $<
67        mv miidevs.h $@
68
69$(LOCAL_INC)/miibus_if.h: $(FREEBSD_SRC)/sys/dev/mii/miibus_if.m
70        awk -f $(TOOLS)/makeobjops.awk $< -h
71        mv miibus_if.h $@
72
73$(LOCAL_SRC)/miibus_if.c: $(FREEBSD_SRC)/sys/dev/mii/miibus_if.m
74        awk -f $(TOOLS)/makeobjops.awk $< -c
75        mv miibus_if.c $@
76
77$(LOCAL_INC)/pci_if.h: $(FREEBSD_SRC)/sys/dev/pci/pci_if.m
78        awk -f $(TOOLS)/makeobjops.awk $< -h
79        mv pci_if.h $@
80
81$(LOCAL_SRC)/pci_if.c: $(FREEBSD_SRC)/sys/dev/pci/pci_if.m
82        awk -f $(TOOLS)/makeobjops.awk $< -c
83        mv pci_if.c $@
84
85$(LOCAL_INC)/pcib_if.h: $(FREEBSD_SRC)/sys/dev/pci/pcib_if.m
86        awk -f $(TOOLS)/makeobjops.awk $< -h
87        mv pcib_if.h $@
88
89$(LOCAL_SRC)/pcib_if.c: $(FREEBSD_SRC)/sys/dev/pci/pcib_if.m
90        awk -f $(TOOLS)/makeobjops.awk $< -c
91        mv pcib_if.c $@
92
93$(LOCAL_INC)/mmcbus_if.h: $(FREEBSD_SRC)/sys/dev/mmc/mmcbus_if.m
94        awk -f $(TOOLS)/makeobjops.awk $< -h
95        mv mmcbus_if.h $@
96
97$(LOCAL_SRC)/mmcbus_if.c: $(FREEBSD_SRC)/sys/dev/mmc/mmcbus_if.m
98        awk -f $(TOOLS)/makeobjops.awk $< -c
99        mv mmcbus_if.c $@
100
101$(LOCAL_INC)/mmcbr_if.h: $(FREEBSD_SRC)/sys/dev/mmc/mmcbr_if.m
102        awk -f $(TOOLS)/makeobjops.awk $< -h
103        mv mmcbr_if.h $@
104
105$(LOCAL_SRC)/mmcbr_if.c: $(FREEBSD_SRC)/sys/dev/mmc/mmcbr_if.m
106        awk -f $(TOOLS)/makeobjops.awk $< -c
107        mv mmcbr_if.c $@
108
109$(LOCAL_INC)/if_dwc_if.h: $(FREEBSD_SRC)/sys/dev/dwc/if_dwc_if.m
110        awk -f $(TOOLS)/makeobjops.awk $< -h
111        mv if_dwc_if.h $@
112
113$(LOCAL_SRC)/if_dwc_if.c: $(FREEBSD_SRC)/sys/dev/dwc/if_dwc_if.m
114        awk -f $(TOOLS)/makeobjops.awk $< -c
115        mv if_dwc_if.c $@
116
117$(LOCAL_INC)/gpio_if.h: $(FREEBSD_SRC)/sys/dev/gpio/gpio_if.m
118        awk -f $(TOOLS)/makeobjops.awk $< -h
119        mv gpio_if.h $@
120
121$(LOCAL_SRC)/gpio_if.c: $(FREEBSD_SRC)/sys/dev/gpio/gpio_if.m
122        awk -f $(TOOLS)/makeobjops.awk $< -c
123        mv gpio_if.c $@
124
125$(LOCAL_SRC)/urtwn-rtl8192cfwT.c: $(FREEBSD_SRC)/sys/contrib/dev/urtwn/urtwn-rtl8192cfwT.fw.uu
126        uudecode -o /dev/stdout $< | python firmware-gen.py \
127            -l "$(FREEBSD_SRC)/sys/contrib/dev/urtwn/LICENSE" \
128            urtwn-rtl8192cfwT - $@
129
130freebsd/usr.bin/netstat/nl_symbols.c: $(FREEBSD_SRC)/usr.bin/netstat/nlist_symbols
131        awk '\
132            BEGIN { \
133                print "#include <sys/param.h>"; \
134                print "#include <nlist.h>"; \
135                print "const struct nlist nl[] = {"; \
136            } \
137            !/^\#/ { printf("\t{ .n_name = \"%s\" },\n", $$2); } \
138            END { print "\t{ .n_name = NULL },\n};" } \
139            ' < $< > $@ || rm -f $@
140
141freebsd/usr.bin/netstat/nl_defs.h: $(FREEBSD_SRC)/usr.bin/netstat/nlist_symbols
142        awk '\
143            BEGIN { \
144                print "#include <nlist.h>"; \
145                print "extern const struct nlist nl[];"; \
146                i = 0; \
147            } \
148            !/^\#/ { printf("\#define\tN%s\t%s\n", toupper($$2), i++); }' \
149            < $< > $@ || rm -f $@
150
151clean:
152        rm $(GENERATED)
Note: See TracBrowser for help on using the repository browser.