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

Subversion Repositories core_arm

[/] [core_arm/] [trunk/] [build/] [config/] [Makefile] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 tarookumic
-include build/Makefile.misc
2
 
3
targets         = mconf conf tkparse
4
 
5
conf_target      = conf.exe
6
conf_files       = conf.o zconf.tab.o
7
conf_hostcompile = y
8
conf_subdirs     =
9
 
10
tkparse_target      = tkparse.exe
11
tkparse_files       = tkcond.o tkgen.o tkparse.o
12
tkparse_tmpfiles    = $(CFGP)/Configs/xconfig.tk $(CFGP)/Configs/xconfig.tk.mid
13
tkparse_hostcompile = y
14
tkparse_subdirs     =
15
 
16
mconf_target      = mconf.exe
17
mconf_files       = mconf.o checklist.o menubox.o textbox.o yesno.o inputbox.o util.o msgbox.o zconf.tab.o
18
mconf_hostcompile = y
19
mconf_subdirs     =
20
 
21
LIBS = -lncurses
22
ifeq (/usr/include/ncurses/ncurses.h, $(wildcard /usr/include/ncurses/ncurses.h))
23
        HOSTNCURSES += -I/usr/include/ncurses -DCURSES_LOC=""
24
else
25
ifeq (/usr/include/ncurses/curses.h, $(wildcard /usr/include/ncurses/curses.h))
26
        HOSTNCURSES += -I/usr/include/ncurses -DCURSES_LOC=""
27
else
28
ifeq (/usr/local/include/ncurses/ncurses.h, $(wildcard /usr/local/include/ncurses/ncurses.h))
29
        HOSTCFLAGS += -I/usr/local/include/ncurses -DCURSES_LOC=""
30
else
31
ifeq (/usr/local/include/ncurses/curses.h, $(wildcard /usr/local/include/ncurses/curses.h))
32
        HOSTCFLAGS += -I/usr/local/include/ncurses -DCURSES_LOC=""
33
else
34
ifeq (/usr/include/ncurses.h, $(wildcard /usr/include/ncurses.h))
35
        HOSTNCURSES += -DCURSES_LOC=""
36
else
37
        HOSTNCURSES += -DCURSES_LOC=""
38
endif
39
endif
40
endif
41
endif
42
endif
43
 
44
LOCAL_CFLAGS            +=  $(HOSTNCURSES)
45
LDFLAGS_mconf.exe        =  -lncurses
46
 
47
 
48
###
49
# The following requires flex/bison
50
# By default we use the _shipped versions, uncomment the
51
# following line if you are modifying the flex/bison src.
52
 
53
#LKC_GENPARSER := 1
54
 
55
 
56
ifdef LKC_GENPARSER
57
 
58
%.tab.c %.tab.h: %.y
59
        bison -t -d -v -b $* -p $(notdir $*) $<
60
 
61
lex.%.c: %.l
62
        flex -P$(notdir $*) -o$@ $<
63
else
64
 
65
lex.zconf.o: lex.zconf.c $(SHARED_DEPS)
66
        $(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@
67
 
68
lex.zconf.c: lex.zconf.c_shipped
69
        cp lex.zconf.c_shipped lex.zconf.c
70
 
71
zconf.tab.o: zconf.tab.c lex.zconf.c confdata.c expr.c symbol.c menu.c $(SHARED_DEPS)
72
        $(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@
73
 
74
zconf.tab.c: zconf.tab.c_shipped
75
        cp zconf.tab.c_shipped zconf.tab.c
76
 
77
zconf.tab.h: zconf.tab.h_shipped
78
        cp zconf.tab.h_shipped zconf.tab.h
79
 
80
endif
81
 
82
 
83
.PHONY: ncurses
84
 
85
ncurses:
86
        @echo "main() {}" > lxtemp.c
87
        @if $(HOSTCC) lxtemp.c $(LIBS) ; then \
88
                $(RM) lxtemp.c a.out; \
89
        else \
90
                $(RM) lxtemp.c; \
91
                echo -e "\007" ;\
92
                echo ">> Unable to find the Ncurses libraries." ;\
93
                echo ">>" ;\
94
                echo ">> You must have Ncurses installed in order" ;\
95
                echo ">> to use 'make menuconfig'" ;\
96
                echo ">>" ;\
97
                echo ">> Maybe you want to try 'make config', which" ;\
98
                echo ">> doesn't depend on the Ncurses libraries." ;\
99
                echo ;\
100
                exit 1 ;\
101
        fi
102
 
103
 
104
 
105
 
106
 
107
 
108
 
109
include build/Makefile.conf
110
include build/Makefile.defs
111
 
112
CFGP = build/config
113
EXE_FIX = $(if $(strip $(shell uname -o | sed -e 's/cygwin//gi')), ,.exe)
114
WISH_EXE_PATH = $(call pathsearch-return,wish$(EXE_FIX))
115
WISH_NOEXEPATH = $(call pathsearch-return,wish)
116
WISH_PATH =  $(if $(WISH_NOEXE_PATH), $(WISH_NOEXE_PATH), $(WISH_EXE_PATH))
117
 
118
config:
119
        @echo --------------------------------------------------------
120
        @echo Trying to build and run xconfig, menuconfig or oldconfig
121
        @echo If neather one will start. Then use:
122
        @echo \"make xconfig\" to try to build and run the tcl/tk graphical configurator. This requires tcl/tk to be installed
123
        @echo \"make menuconfig\" to try to build and run the ncurses configurator. This requires ncurses to be installed
124
        @echo \"make oldconfig\" to try to build and run the shell configurator
125
        @echo --------------------------------------------------------
126
        -$(MAKE) -f build/Makefile.c obj=build/config target=tkparse cmd=dobuild >/dev/null 2>&1
127
        -$(MAKE) -f build/Makefile.c obj=build/config target=mconf cmd=dobuild >/dev/null 2>&1
128
        -$(MAKE) -f build/Makefile.c obj=build/config target=conf cmd=dobuild >/dev/null 2>&1
129
        $(if $(strip $(wildcard $(WISH_PATH))), \
130
  $(CFGP)/tkparse.exe < $(CFGP)/Configs/xconfig.in > $(CFGP)/Configs/xconfig.tk.mid; \
131
  cat $(CFGP)/header.tk $(CFGP)/Configs/xconfig.tk.mid $(CFGP)/tail.tk >$(CFGP)/Configs/xconfig.tk; \
132
  $(WISH_PATH) $(CFGP)/Configs/xconfig.tk \
133
,$(if $(strip $(wildcard $(CFGP)/mconf.exe)), \
134
  @echo Could not start xconfig. \
135
  Switching to menuconfig instead;$(CFGP)/mconf.exe $(CFGP)/Configs/Config.in \
136
,$(if $(strip $(wildcard $(CFGP)/conf.exe)), \
137
  @echo Could not start xconfig nor menuconfig. \
138
  Switching to oldconfig instead;$(CFGP)/conf.exe $(CFGP)/Configs/Config.in \
139
,echo Neather tkconfig, menuconfig or oldconfig could be build;exit 1)))
140
        $(MAKE) -f build/Makefile.switch obj=$(CFGP) .config.vhd
141
 
142
xconfig:
143
        $(MAKE) -f build/Makefile.c obj=$(CFGP) target=tkparse cmd=dobuild
144
        $(CFGP)/tkparse.exe < $(CFGP)/Configs/xconfig.in > $(CFGP)/Configs/xconfig.tk.mid;
145
        cat $(CFGP)/header.tk $(CFGP)/Configs/xconfig.tk.mid $(CFGP)/tail.tk >$(CFGP)/Configs/xconfig.tk;
146
        $(WISH_PATH) $(CFGP)/Configs/xconfig.tk
147
        $(MAKE) -f build/Makefile.switch obj=$(CFGP) .config.vhd
148
 
149
menuconfig:
150
        $(MAKE) -f build/Makefile.c obj=$(CFGP) target=mconf cmd=dobuild
151
        $(CFGP)/mconf.exe $(CFGP)/Configs/Config.in
152
        $(MAKE) -f build/Makefile.switch obj=$(CFGP) .config.vhd
153
 
154
oldconfig:
155
        $(MAKE) -f build/Makefile.c obj=$(CFGP) target=conf cmd=dobuild
156
        $(CFGP)/conf.exe $(CFGP)/Configs/Config.in
157
        $(MAKE) -f build/Makefile.switch obj=$(CFGP) .config.vhd
158
 
159
CLEANFILES += $(CFGP)/Configs/xconfig.tk $(CFGP)/Configs/xconfig.tk.mid
160
 
161
.config.vhd : .config
162
        build/scanconfig.pl .config >.config.vhd
163
        touch .config.vhd

powered by: WebSVN 2.1.0

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