OpenCores
URL https://opencores.org/ocsvn/i2s_to_wb/i2s_to_wb/trunk

Subversion Repositories i2s_to_wb

[/] [i2s_to_wb/] [trunk/] [libs/] [Makefile] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 qaztronic
#
2
 
3
export ROOT_DIR = ../..
4
 
5
MODEL_TECH ?= /cygdrive/c/altera/91/modelsim_ase/win32aloem
6
PATH := ${MODEL_TECH}:${PATH}
7
 
8
 
9
VLIB = vlib
10
VLOG = vlog
11
VMAKE = vmake
12
 
13
# WORK_LIBRARY_FILES += $(shell grep [\.]v[[:space:]]*$$ $(WORK_LIBRARY)_files.txt | tr '\n' ' ' )
14
 
15
WORK_LIBRARY += sim
16
 
17
 
18
ALL_MK_FILES = $(foreach mk, $(WORK_LIBRARY), ./$(mk)/$(mk).mk)
19
ALL_REFRESH  = $(foreach refresh, $(WORK_LIBRARY), $(refresh)_refresh )
20
# ALL_DEBUG    = $(foreach debug, $(WORK_LIBRARY), $(debug)_debug )
21
# ALL_INFO     = $(foreach info, $(WORK_LIBRARY), ./$(info)/_info )
22
 
23
 
24
define build_unit
25
$(1): $(1)_files.txt
26
        @echo "-#- initial build of $$@ library."
27
        $(VLIB) $$@
28
        $(VLOG) -O0 -work $$@ -f $$@_files.txt
29
        @echo "-#- "
30
 
31
./$(1)/$(1).mk: $(1)_files.txt
32
        @echo "-#- generating unit make file for $$*."
33
        $(VMAKE) $(1) > $$@
34
        @echo "-#- "
35
 
36
$(1)_refresh:
37
        @echo "-#- refreshing unit $(1)."
38
        $$(MAKE) -f ./$(1)/$(1).mk
39
        @echo "-#- "
40
 
41
# $(1)_debug:
42
#       @echo "-d- "
43
#       @echo "-d- $$@ -  $$* - $$% - $$<  "
44
#       @echo "-d- $(shell grep [\.]v[[:space:]]*$$ $(1)_files.txt | tr '\n' ' ' ) "
45
#       @echo "-d- "
46
 
47
endef
48
 
49
 
50
.PHONY: all clean
51
 
52
all: $(WORK_LIBRARY) $(ALL_MK_FILES) $(ALL_REFRESH)
53
# all: debug
54
# all: $(WORK_LIBRARY) $(ALL_MK_FILES) $(ALL_DEBUG)
55
 
56
$(foreach unit,$(WORK_LIBRARY),$(eval $(call build_unit,$(unit))))
57
 
58
clean:
59
        -rm -Rf $(WORK_LIBRARY)
60
 
61
# debug:
62
#       @echo "-d- $@ -  $* - $% - $<  "
63
#       @echo "-d- $(PATH)  "
64
 
65
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.