1 # $Id: Makefile,v 1.3 2004/01/07 20:34:55 johana Exp $
2 # Makefile to generate or copy the latest register definitions
3 # and related datastructures and helpermacros.
4 # The offical place for these files is probably at:
6 IOPOFFICIAL_INCDIR
= /n
/asic
/projects
/guinness
/releases
/$(RELEASE
)/design
/top
/sw
/include/
8 IOPROCDIR
= /n
/asic
/design
/io
/io_proc
/rtl
12 IOPROCINCL_FILES
+= iop_crc_par_defs.h
13 IOPROCINCL_FILES
+= iop_dmc_in_defs.h
14 IOPROCINCL_FILES
+= iop_dmc_out_defs.h
15 IOPROCINCL_FILES
+= iop_fifo_in_defs.h
16 IOPROCINCL_FILES
+= iop_fifo_in_xtra_defs.h
17 IOPROCINCL_FILES
+= iop_fifo_out_defs.h
18 IOPROCINCL_FILES
+= iop_fifo_out_xtra_defs.h
19 IOPROCINCL_FILES
+= iop_mpu_defs.h
20 IOPROCINCL_FILES2
+= iop_mpu_macros.h
21 IOPROCINCL_FILES2
+= iop_reg_space.h
22 IOPROCINCL_FILES
+= iop_sap_in_defs.h
23 IOPROCINCL_FILES
+= iop_sap_out_defs.h
24 IOPROCINCL_FILES
+= iop_scrc_in_defs.h
25 IOPROCINCL_FILES
+= iop_scrc_out_defs.h
26 IOPROCINCL_FILES
+= iop_spu_defs.h
28 IOPROCINCL_FILES
+= iop_sw_cfg_defs.h
29 IOPROCINCL_FILES
+= iop_sw_cpu_defs.h
30 IOPROCINCL_FILES
+= iop_sw_mpu_defs.h
31 IOPROCINCL_FILES
+= iop_sw_spu_defs.h
33 IOPROCINCL_FILES
+= iop_timer_grp_defs.h
34 IOPROCINCL_FILES
+= iop_trigger_grp_defs.h
36 IOPROCINCL_FILES
+= iop_version_defs.h
38 IOPROCASMINCL_FILES
= $(patsubst %_defs.h
,%_defs_asm.h
,$(IOPROCINCL_FILES
))
39 IOPROCASMINCL_FILES
+= iop_reg_space_asm.h
43 IOPROCREGDESC
+= $(IOPROCDIR
)/iop_crc_par.r
44 #IOPROCREGDESC += $(IOPROCDIR)/iop_crc_ser.r
45 IOPROCREGDESC
+= $(IOPROCDIR
)/iop_dmc_in.r
46 IOPROCREGDESC
+= $(IOPROCDIR
)/iop_dmc_out.r
47 IOPROCREGDESC
+= $(IOPROCDIR
)/iop_fifo_in.r
48 IOPROCREGDESC
+= $(IOPROCDIR
)/iop_fifo_in_xtra.r
49 IOPROCREGDESC
+= $(IOPROCDIR
)/iop_fifo_out.r
50 IOPROCREGDESC
+= $(IOPROCDIR
)/iop_fifo_out_xtra.r
51 IOPROCREGDESC
+= $(IOPROCDIR
)/iop_mpu.r
52 IOPROCREGDESC
+= $(IOPROCDIR
)/iop_sap_in.r
53 IOPROCREGDESC
+= $(IOPROCDIR
)/iop_sap_out.r
54 IOPROCREGDESC
+= $(IOPROCDIR
)/iop_scrc_in.r
55 IOPROCREGDESC
+= $(IOPROCDIR
)/iop_scrc_out.r
56 IOPROCREGDESC
+= $(IOPROCDIR
)/iop_spu.r
57 IOPROCREGDESC
+= $(IOPROCDIR
)/guinness
/iop_sw_cfg.r
58 IOPROCREGDESC
+= $(IOPROCDIR
)/guinness
/iop_sw_cpu.r
59 IOPROCREGDESC
+= $(IOPROCDIR
)/guinness
/iop_sw_mpu.r
60 IOPROCREGDESC
+= $(IOPROCDIR
)/guinness
/iop_sw_spu.r
61 IOPROCREGDESC
+= $(IOPROCDIR
)/iop_timer_grp.r
62 IOPROCREGDESC
+= $(IOPROCDIR
)/iop_trigger_grp.r
63 IOPROCREGDESC
+= $(IOPROCDIR
)/guinness
/iop_version.r
66 RDES2C
= /n
/asic
/bin
/rdes2c
67 RDES2C
= /n
/asic
/design
/tools
/rdesc
/rdes2c
68 RDES2INTR
= /n
/asic
/design
/tools
/rdesc
/rdes2intr
69 RDES2TXT
= /n
/asic
/design
/tools
/rdesc
/rdes2txt
71 ## all - Just print help - you probably want to do 'make gen'
78 ## gen - Generate include files
79 gen
: $(IOPROCINCL_FILES
) $(IOPROCINCL_FILES2
) $(IOPROCASMINCL_FILES
)
80 echo
"INCL: $(IOPROCINCL_FILES)"
81 echo
"INCL2: $(IOPROCINCL_FILES2)"
82 echo
"ASMINCL: $(IOPROCASMINCL_FILES)"
84 # From the official location...
85 iop_reg_space.h
: $(IOPOFFICIAL_INCDIR
)/iop_reg_space.h
86 cat
$< | sed
-e
's/\$$Id\:/id\:/g' >$@
87 iop_mpu_macros.h
: $(IOPOFFICIAL_INCDIR
)/iop_mpu_macros.h
88 cat
$< | sed
-e
's/\$$Id\:/id\:/g' >$@
90 ## copy - Copy files from official location
92 @echo
"## Copying and fixing iop files ##"
93 @for HFILE in
$(IOPROCINCL_FILES
); do \
95 cat
$(IOPOFFICIAL_INCDIR
)$$HFILE | sed
-e
's/\$$Id\:/id\:/g' > $$HFILE; \
97 @for HFILE in
$(IOPROCINCL_FILES2
); do \
99 cat
$(IOPOFFICIAL_INCDIR
)$$HFILE | sed
-e
's/\$$Id\:/id\:/g' > $$HFILE; \
101 @echo
"## Copying and fixing iop asm files ##"
102 @for HFILE in
$(IOPROCASMINCL_FILES
); do \
104 cat
$(IOPOFFICIAL_INCDIR
)asm
/$$HFILE | sed
-e
's/\$$Id\:/id\:/g' > asm
/$$HFILE; \
107 # I/O processor files:
108 ## iop - Generate I/O processor include files
109 iop
: $(IOPROCINCL_FILES
) $(IOPROCINCL_FILES2
) $(IOPROCASMINCL_FILES
)
110 iop_sw_
%_defs.h
: $(IOPROCDIR
)/guinness
/iop_sw_
%.r
112 iop_version_defs.h
: $(IOPROCDIR
)/guinness
/iop_version.r
114 %_defs.h
: $(IOPROCDIR
)/%.r
116 %_defs_asm.h
: $(IOPROCDIR
)/%.r
118 iop_version_defs_asm.h
: $(IOPROCDIR
)/guinness
/iop_version.r
121 ## doc - Generate .axw files from register description.
122 doc
: $(IOPROCREGDESC
)
124 $(RDES2TXT
) $$RDES; \
128 ## %.axw - Generate the specified .axw file (doesn't work for all files
129 ## due to inconsistent naming of .r files.
131 @for RDES in
$(IOPROCREGDESC
); do \
132 if echo
"$$RDES" | grep
$* ; then \
133 $(RDES2TXT
) $$RDES; \
138 ## clean - Remove .h files and .axw files.
140 rm -rf
$(IOPROCINCL_FILES
) *.axw
143 ## cleandoc - Remove .axw files.