intermed.mak
3.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
### intermediate make file for XGC
# *************************************************************************
# Set PHONY
# *************************************************************************
.PHONY : ALL
# *************************************************************************
# Common macro definitions
# *************************************************************************
#$(call Upper,$(1)) ...... reference $(1) in upper-case letters
Upper = $(subst z,Z,$(subst y,Y,$(subst x,X,$(subst w,W,$(subst v,V,$(subst u,U,$(subst t,T,$(subst s,S,$(subst r,R,$(subst q,Q,$(subst p,P,$(subst o,O,$(subst n,N,$(subst m,M,$(subst l,L,$(subst k,K,$(subst j,J,$(subst i,I,$(subst h,H,$(subst g,G,$(subst f,F,$(subst e,E,$(subst d,D,$(subst c,C,$(subst b,B,$(subst a,A,$(1)))))))))))))))))))))))))))
# *************************************************************************
# Include scripts
# *************************************************************************
include make\~compbld.tmp # Temporary build script created by gsm2.mak
include make\ALIAS.mak
include make\complib.txt
-include make\app_cfg.mak
include make\~buildinfo.tmp
ALL: $(COMPLIBLIST)
%.lib:
@perl tools\time.pl
@echo LOG: $(strip $(COMPLOGDIR))\$*.log
@if not exist $(strip $(OBJSDIR))\$* md $(strip $(OBJSDIR))\$*
@if not exist $(strip $(TARGDIR))\log\$* md $(strip $(TARGDIR))\log\$*
@if $(ACTION)==new if exist $(strip $(RULESDIR))\$*.dep del /q /f $(strip $(RULESDIR))\$*.dep
@if $(ACTION)==bm_new if exist $(strip $(RULESDIR))\$*.dep del /q /f $(strip $(RULESDIR))\$*.dep
@if not $(ACTION)==remake if not exist $(strip $(RULESDIR))\$*_dep md $(strip $(RULESDIR))\$*_dep
@if $(ACTION)==new if exist $(strip $(RULESDIR))\$*_dep\*.det del /f /q $(strip $(RULESDIR))\$*_dep\*.det
@if $(ACTION)==bm_new if exist $(strip $(RULESDIR))\$*_dep\*.det del /f /q $(strip $(RULESDIR))\$*_dep\*.det
@(tools\make.exe -fmake\comp.mak -k -r -R $(strip $(CMD_ARGU)) COMPONENT=$* setup_env > $(strip $(COMPLOGDIR))\$*_setEnv.log 2>&1)
ifneq ($(strip $(BM_NEW)),TRUE)
ifeq ($(call Upper,$(strip $(OS))),WINDOWS_NT)
@(tools\make.exe -fmake\comp.mak -r -R $(strip $(CMD_ARGU)) COMPONENT=$* update_lib > $(strip $(COMPLOGDIR))\$*.log 2>&1) & \
(if ERRORLEVEL 1 \
(perl tools\get_log.pl $(strip $(COMPLOGDIR))\$*.log $(strip $(COMPLOGDIR))\$* tools\copy_mmi_include_h.bat) & \
(if exist $(strip $(COMPLOGDIR))\$* rd /S /Q $(strip $(COMPLOGDIR))\$*) & \
(exit 1) \
else \
(perl tools\get_log.pl $(strip $(COMPLOGDIR))\$*.log $(strip $(COMPLOGDIR))\$*) & \
(if exist $(strip $(COMPLOGDIR))\$* rd /S /Q $(strip $(COMPLOGDIR))\$*) \
)
else
@echo OS NOT EQ WINDOWS_NT
tools\make.exe -fmake\comp.mak -r -R $(strip $(CMD_ARGU)) COMPONENT=$* update_lib > $(strip $(COMPLOGDIR))\$*.log 2>&1
endif
else
ifeq ($(call Upper,$(strip $(OS))),WINDOWS_NT)
@(tools\make.exe -fmake\comp.mak -k -r -R $(strip $(CMD_ARGU)) COMPONENT=$* update_lib > $(strip $(COMPLOGDIR))\$*.log 2>&1) & \
(if ERRORLEVEL 1 \
(perl tools\get_log.pl $(strip $(COMPLOGDIR))\$*.log $(strip $(COMPLOGDIR))\$* tools\copy_mmi_include_h.bat) & \
(if exist $(strip $(COMPLOGDIR))\$* rd /S /Q $(strip $(COMPLOGDIR))\$*) & \
(exit 1) \
else \
(perl tools\get_log.pl $(strip $(COMPLOGDIR))\$*.log $(strip $(COMPLOGDIR))\$*) & \
(if exist $(strip $(COMPLOGDIR))\$* rd /S /Q $(strip $(COMPLOGDIR))\$*) \
)
else
tools\make.exe -fmake\comp.mak -k -r -R $(strip $(CMD_ARGU)) COMPONENT=$* update_lib > $(strip $(COMPLOGDIR))\$*.log 2>&1
endif
endif