Makefile 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435
  1. #
  2. # SPDX-License-Identifier: BSD-2-Clause
  3. #
  4. # Copyright (c) 2019 Western Digital Corporation or its affiliates.
  5. #
  6. # Authors:
  7. # Anup Patel <anup.patel@wdc.com>
  8. #
  9. # Select Make Options:
  10. # o Do not use make's built-in rules
  11. # o Do not print "Entering directory ...";
  12. MAKEFLAGS += -r --no-print-directory
  13. # Readlink -f requires GNU readlink
  14. ifeq ($(shell uname -s),Darwin)
  15. READLINK ?= greadlink
  16. else
  17. READLINK ?= readlink
  18. endif
  19. # Find out source, build, and install directories
  20. src_dir=$(CURDIR)
  21. ifdef O
  22. build_dir=$(shell $(READLINK) -f $(O))
  23. else
  24. build_dir=$(CURDIR)/build
  25. endif
  26. ifeq ($(build_dir),$(CURDIR))
  27. $(error Build directory is same as source directory.)
  28. endif
  29. ifdef I
  30. install_dir=$(shell $(READLINK) -f $(I))
  31. else
  32. install_dir=$(CURDIR)/install
  33. endif
  34. ifeq ($(install_dir),$(CURDIR))
  35. $(error Install directory is same as source directory.)
  36. endif
  37. ifeq ($(install_dir),$(build_dir))
  38. $(error Install directory is same as build directory.)
  39. endif
  40. ifdef PLATFORM_DIR
  41. platform_dir_path=$(shell $(READLINK) -f $(PLATFORM_DIR))
  42. ifdef PLATFORM
  43. platform_parent_dir=$(platform_dir_path)
  44. else
  45. PLATFORM=$(shell basename $(platform_dir_path))
  46. platform_parent_dir=$(subst $(PLATFORM),,$(platform_dir_path))
  47. endif
  48. else
  49. platform_parent_dir=$(src_dir)/platform
  50. endif
  51. # Check if verbosity is ON for build process
  52. CMD_PREFIX_DEFAULT := @
  53. ifeq ($(V), 1)
  54. CMD_PREFIX :=
  55. else
  56. CMD_PREFIX := $(CMD_PREFIX_DEFAULT)
  57. endif
  58. # Setup path of directories
  59. export platform_subdir=$(PLATFORM)
  60. export platform_src_dir=$(platform_parent_dir)/$(platform_subdir)
  61. export platform_build_dir=$(build_dir)/platform/$(platform_subdir)
  62. export include_dir=$(CURDIR)/include
  63. export libsbi_dir=$(CURDIR)/lib/sbi
  64. export libsbiutils_dir=$(CURDIR)/lib/utils
  65. export firmware_dir=$(CURDIR)/firmware
  66. # Find library version
  67. OPENSBI_VERSION_MAJOR=`grep "define OPENSBI_VERSION_MAJOR" $(include_dir)/sbi/sbi_version.h | sed 's/.*MAJOR.*\([0-9][0-9]*\)/\1/'`
  68. OPENSBI_VERSION_MINOR=`grep "define OPENSBI_VERSION_MINOR" $(include_dir)/sbi/sbi_version.h | sed 's/.*MINOR.*\([0-9][0-9]*\)/\1/'`
  69. OPENSBI_VERSION_GIT=$(shell if [ -d $(src_dir)/.git ]; then git describe 2> /dev/null; fi)
  70. # Setup compilation commands
  71. ifdef CROSS_COMPILE
  72. CC = $(CROSS_COMPILE)gcc
  73. CPP = $(CROSS_COMPILE)cpp
  74. AR = $(CROSS_COMPILE)ar
  75. LD = $(CROSS_COMPILE)ld
  76. OBJCOPY = $(CROSS_COMPILE)objcopy
  77. else
  78. CC ?= gcc
  79. CPP ?= cpp
  80. AR ?= ar
  81. LD ?= ld
  82. OBJCOPY ?= objcopy
  83. endif
  84. AS = $(CC)
  85. DTC = dtc
  86. # Guess the compillers xlen
  87. OPENSBI_CC_XLEN := $(shell TMP=`$(CC) -dumpmachine | sed 's/riscv\([0-9][0-9]\).*/\1/'`; echo $${TMP})
  88. # Setup platform XLEN
  89. ifndef PLATFORM_RISCV_XLEN
  90. ifeq ($(OPENSBI_CC_XLEN), 32)
  91. PLATFORM_RISCV_XLEN = 32
  92. else
  93. PLATFORM_RISCV_XLEN = 64
  94. endif
  95. endif
  96. # Setup list of objects.mk files
  97. ifdef PLATFORM
  98. platform-object-mks=$(shell if [ -d $(platform_src_dir)/ ]; then find $(platform_src_dir) -iname "objects.mk" | sort -r; fi)
  99. endif
  100. libsbi-object-mks=$(shell if [ -d $(libsbi_dir) ]; then find $(libsbi_dir) -iname "objects.mk" | sort -r; fi)
  101. libsbiutils-object-mks=$(shell if [ -d $(libsbiutils_dir) ]; then find $(libsbiutils_dir) -iname "objects.mk" | sort -r; fi)
  102. firmware-object-mks=$(shell if [ -d $(firmware_dir) ]; then find $(firmware_dir) -iname "objects.mk" | sort -r; fi)
  103. # Include platform specifig config.mk
  104. ifdef PLATFORM
  105. include $(platform_src_dir)/config.mk
  106. endif
  107. # Include all object.mk files
  108. ifdef PLATFORM
  109. include $(platform-object-mks)
  110. endif
  111. include $(libsbi-object-mks)
  112. include $(libsbiutils-object-mks)
  113. include $(firmware-object-mks)
  114. # Setup list of objects
  115. libsbi-objs-path-y=$(foreach obj,$(libsbi-objs-y),$(build_dir)/lib/sbi/$(obj))
  116. libsbiutils-objs-path-y=$(foreach obj,$(libsbiutils-objs-y),$(build_dir)/lib/utils/$(obj))
  117. ifdef PLATFORM
  118. platform-objs-path-y=$(foreach obj,$(platform-objs-y),$(platform_build_dir)/$(obj))
  119. platform-dtb-path-y=$(foreach obj,$(platform-dtb-y),$(platform_build_dir)/$(obj))
  120. firmware-bins-path-y=$(foreach bin,$(firmware-bins-y),$(platform_build_dir)/firmware/$(bin))
  121. endif
  122. firmware-elfs-path-y=$(firmware-bins-path-y:.bin=.elf)
  123. firmware-objs-path-y=$(firmware-bins-path-y:.bin=.o)
  124. # Setup list of deps files for objects
  125. deps-y=$(platform-objs-path-y:.o=.dep)
  126. deps-y+=$(libsbi-objs-path-y:.o=.dep)
  127. deps-y+=$(libsbiutils-objs-path-y:.o=.dep)
  128. deps-y+=$(firmware-objs-path-y:.o=.dep)
  129. # Setup platform ABI, ISA and Code Model
  130. ifndef PLATFORM_RISCV_ABI
  131. ifeq ($(PLATFORM_RISCV_XLEN), 32)
  132. PLATFORM_RISCV_ABI = ilp$(PLATFORM_RISCV_XLEN)
  133. else
  134. PLATFORM_RISCV_ABI = lp$(PLATFORM_RISCV_XLEN)
  135. endif
  136. endif
  137. ifndef PLATFORM_RISCV_ISA
  138. PLATFORM_RISCV_ISA = rv$(PLATFORM_RISCV_XLEN)imafdc
  139. endif
  140. ifndef PLATFORM_RISCV_CODE_MODEL
  141. PLATFORM_RISCV_CODE_MODEL = medany
  142. endif
  143. # Setup compilation commands flags
  144. GENFLAGS = -I$(platform_src_dir)/include
  145. GENFLAGS += -I$(include_dir)
  146. ifneq ($(OPENSBI_VERSION_GIT),)
  147. GENFLAGS += -DOPENSBI_VERSION_GIT="\"$(OPENSBI_VERSION_GIT)\""
  148. endif
  149. GENFLAGS += $(libsbiutils-genflags-y)
  150. GENFLAGS += $(platform-genflags-y)
  151. GENFLAGS += $(firmware-genflags-y)
  152. CFLAGS = -g -Wall -Werror -ffreestanding -nostdlib -fno-strict-aliasing -O2
  153. CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
  154. CFLAGS += -mno-save-restore -mstrict-align
  155. CFLAGS += -mabi=$(PLATFORM_RISCV_ABI) -march=$(PLATFORM_RISCV_ISA)
  156. CFLAGS += -mcmodel=$(PLATFORM_RISCV_CODE_MODEL)
  157. CFLAGS += $(GENFLAGS)
  158. CFLAGS += $(platform-cflags-y)
  159. CFLAGS += $(firmware-cflags-y)
  160. CFLAGS += -fno-pie -no-pie
  161. CPPFLAGS += $(GENFLAGS)
  162. CPPFLAGS += $(platform-cppflags-y)
  163. CPPFLAGS += $(firmware-cppflags-y)
  164. ASFLAGS = -g -Wall -nostdlib -D__ASSEMBLY__
  165. ASFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
  166. ASFLAGS += -mno-save-restore -mstrict-align
  167. ASFLAGS += -mabi=$(PLATFORM_RISCV_ABI) -march=$(PLATFORM_RISCV_ISA)
  168. ASFLAGS += -mcmodel=$(PLATFORM_RISCV_CODE_MODEL)
  169. ASFLAGS += $(GENFLAGS)
  170. ASFLAGS += $(platform-asflags-y)
  171. ASFLAGS += $(firmware-asflags-y)
  172. ARFLAGS = rcs
  173. ELFFLAGS += -Wl,--build-id=none -N -static-libgcc -lgcc
  174. ELFFLAGS += $(platform-ldflags-y)
  175. ELFFLAGS += $(firmware-ldflags-y)
  176. MERGEFLAGS += -r
  177. MERGEFLAGS += -b elf$(PLATFORM_RISCV_XLEN)-littleriscv
  178. MERGEFLAGS += -m elf$(PLATFORM_RISCV_XLEN)lriscv
  179. DTCFLAGS = -O dtb
  180. # Setup functions for compilation
  181. define dynamic_flags
  182. -I$(shell dirname $(2)) -D__OBJNAME__=$(subst -,_,$(shell basename $(1) .o))
  183. endef
  184. merge_objs = $(CMD_PREFIX)mkdir -p `dirname $(1)`; \
  185. echo " MERGE $(subst $(build_dir)/,,$(1))"; \
  186. $(LD) $(MERGEFLAGS) $(2) -o $(1)
  187. merge_deps = $(CMD_PREFIX)mkdir -p `dirname $(1)`; \
  188. echo " MERGE-DEP $(subst $(build_dir)/,,$(1))"; \
  189. cat $(2) > $(1)
  190. copy_file = $(CMD_PREFIX)mkdir -p `dirname $(1)`; \
  191. echo " COPY $(subst $(build_dir)/,,$(1))"; \
  192. cp -f $(2) $(1)
  193. inst_file = $(CMD_PREFIX)mkdir -p `dirname $(1)`; \
  194. echo " INSTALL $(subst $(install_dir)/,,$(1))"; \
  195. cp -f $(2) $(1)
  196. inst_file_list = $(CMD_PREFIX)if [ ! -z "$(4)" ]; then \
  197. mkdir -p $(1)/$(3); \
  198. for file in $(4) ; do \
  199. rel_file=`echo $$file | sed -e 's@$(2)/$(3)/@@'`; \
  200. dest_file=$(1)"/"$(3)"/"`echo $$rel_file`; \
  201. dest_dir=`dirname $$dest_file`; \
  202. echo " INSTALL "$(3)"/"`echo $$rel_file`; \
  203. mkdir -p $$dest_dir; \
  204. cp -f $$file $$dest_file; \
  205. done \
  206. fi
  207. inst_header_dir = $(CMD_PREFIX)mkdir -p $(1); \
  208. echo " INSTALL $(subst $(install_dir)/,,$(1))"; \
  209. cp -rf $(2) $(1)
  210. compile_cpp = $(CMD_PREFIX)mkdir -p `dirname $(1)`; \
  211. echo " CPP $(subst $(build_dir)/,,$(1))"; \
  212. $(CPP) $(CPPFLAGS) -x c $(2) | grep -v "\#" > $(1)
  213. compile_cc_dep = $(CMD_PREFIX)mkdir -p `dirname $(1)`; \
  214. echo " CC-DEP $(subst $(build_dir)/,,$(1))"; \
  215. printf %s `dirname $(1)`/ > $(1) && \
  216. $(CC) $(CFLAGS) $(call dynamic_flags,$(1),$(2)) \
  217. -MM $(2) >> $(1) || rm -f $(1)
  218. compile_cc = $(CMD_PREFIX)mkdir -p `dirname $(1)`; \
  219. echo " CC $(subst $(build_dir)/,,$(1))"; \
  220. $(CC) $(CFLAGS) $(call dynamic_flags,$(1),$(2)) -c $(2) -o $(1)
  221. compile_as_dep = $(CMD_PREFIX)mkdir -p `dirname $(1)`; \
  222. echo " AS-DEP $(subst $(build_dir)/,,$(1))"; \
  223. printf %s `dirname $(1)`/ > $(1) && \
  224. $(AS) $(ASFLAGS) $(call dynamic_flags,$(1),$(2)) \
  225. -MM $(2) >> $(1) || rm -f $(1)
  226. compile_as = $(CMD_PREFIX)mkdir -p `dirname $(1)`; \
  227. echo " AS $(subst $(build_dir)/,,$(1))"; \
  228. $(AS) $(ASFLAGS) $(call dynamic_flags,$(1),$(2)) -c $(2) -o $(1)
  229. compile_elf = $(CMD_PREFIX)mkdir -p `dirname $(1)`; \
  230. echo " ELF $(subst $(build_dir)/,,$(1))"; \
  231. $(CC) $(CFLAGS) $(3) $(ELFFLAGS) -Wl,-T$(2) -o $(1)
  232. compile_ar = $(CMD_PREFIX)mkdir -p `dirname $(1)`; \
  233. echo " AR $(subst $(build_dir)/,,$(1))"; \
  234. $(AR) $(ARFLAGS) $(1) $(2)
  235. compile_objcopy = $(CMD_PREFIX)mkdir -p `dirname $(1)`; \
  236. echo " OBJCOPY $(subst $(build_dir)/,,$(1))"; \
  237. $(OBJCOPY) -S -O binary $(2) $(1)
  238. compile_dts = $(CMD_PREFIX)mkdir -p `dirname $(1)`; \
  239. echo " DTC $(subst $(build_dir)/,,$(1))"; \
  240. $(DTC) $(DTCFLAGS) -o $(1) $(2)
  241. targets-y = $(build_dir)/lib/libsbi.a
  242. targets-y += $(build_dir)/lib/libsbiutils.a
  243. ifdef PLATFORM
  244. targets-y += $(platform_build_dir)/lib/libplatsbi.a
  245. targets-y += $(platform-dtb-path-y)
  246. endif
  247. targets-y += $(firmware-bins-path-y)
  248. # Default rule "make" should always be first rule
  249. .PHONY: all
  250. all: $(targets-y)
  251. # Preserve all intermediate files
  252. .SECONDARY:
  253. $(build_dir)/%.bin: $(build_dir)/%.elf
  254. $(call compile_objcopy,$@,$<)
  255. $(build_dir)/%.elf: $(build_dir)/%.o $(build_dir)/%.elf.ld $(platform_build_dir)/lib/libplatsbi.a
  256. $(call compile_elf,$@,$@.ld,$< $(platform_build_dir)/lib/libplatsbi.a)
  257. $(platform_build_dir)/%.ld: $(src_dir)/%.ldS
  258. $(call compile_cpp,$@,$<)
  259. $(build_dir)/lib/libsbi.a: $(libsbi-objs-path-y)
  260. $(call compile_ar,$@,$^)
  261. $(build_dir)/lib/libsbiutils.a: $(libsbi-objs-path-y) $(libsbiutils-objs-path-y)
  262. $(call compile_ar,$@,$^)
  263. $(platform_build_dir)/lib/libplatsbi.a: $(libsbi-objs-path-y) $(libsbiutils-objs-path-y) $(platform-objs-path-y)
  264. $(call compile_ar,$@,$^)
  265. $(build_dir)/%.dep: $(src_dir)/%.c
  266. $(call compile_cc_dep,$@,$<)
  267. $(build_dir)/%.o: $(src_dir)/%.c
  268. $(call compile_cc,$@,$<)
  269. $(build_dir)/%.dep: $(src_dir)/%.S
  270. $(call compile_as_dep,$@,$<)
  271. $(build_dir)/%.o: $(src_dir)/%.S
  272. $(call compile_as,$@,$<)
  273. $(platform_build_dir)/%.dep: $(platform_src_dir)/%.c
  274. $(call compile_cc_dep,$@,$<)
  275. $(platform_build_dir)/%.o: $(platform_src_dir)/%.c
  276. $(call compile_cc,$@,$<)
  277. $(platform_build_dir)/%.dep: $(platform_src_dir)/%.S
  278. $(call compile_as_dep,$@,$<)
  279. $(platform_build_dir)/%.o: $(platform_src_dir)/%.S
  280. $(call compile_as,$@,$<)
  281. $(platform_build_dir)/%.dep: $(src_dir)/%.c
  282. $(call compile_cc_dep,$@,$<)
  283. $(platform_build_dir)/%.o: $(src_dir)/%.c
  284. $(call compile_cc,$@,$<)
  285. $(platform_build_dir)/%.dep: $(src_dir)/%.S
  286. $(call compile_as_dep,$@,$<)
  287. $(platform_build_dir)/%.o: $(src_dir)/%.S
  288. $(call compile_as,$@,$<)
  289. $(build_dir)/%.dtb: $(src_dir)/%.dts
  290. $(call compile_dts,$@,$<)
  291. # Rule for "make docs"
  292. $(build_dir)/docs/latex/refman.pdf: $(build_dir)/docs/latex/refman.tex
  293. $(CMD_PREFIX)mkdir -p $(build_dir)/docs
  294. $(CMD_PREFIX)$(MAKE) -C $(build_dir)/docs/latex
  295. $(build_dir)/docs/latex/refman.tex: $(build_dir)/docs/doxygen.cfg
  296. $(CMD_PREFIX)mkdir -p $(build_dir)/docs
  297. $(CMD_PREFIX)doxygen $(build_dir)/docs/doxygen.cfg
  298. $(build_dir)/docs/doxygen.cfg: $(src_dir)/docs/doxygen.cfg
  299. $(CMD_PREFIX)mkdir -p $(build_dir)/docs
  300. $(CMD_PREFIX)cat docs/doxygen.cfg | sed -e "s#@@SRC_DIR@@#$(src_dir)#" -e "s#@@BUILD_DIR@@#$(build_dir)#" -e "s#@@OPENSBI_MAJOR@@#$(OPENSBI_VERSION_MAJOR)#" -e "s#@@OPENSBI_MINOR@@#$(OPENSBI_VERSION_MINOR)#" > $(build_dir)/docs/doxygen.cfg
  301. .PHONY: docs
  302. docs: $(build_dir)/docs/latex/refman.pdf
  303. # Dependency files should only be included after default Makefile rules
  304. # They should not be included for any "xxxconfig" or "xxxclean" rule
  305. all-deps-1 = $(if $(findstring config,$(MAKECMDGOALS)),,$(deps-y))
  306. all-deps-2 = $(if $(findstring clean,$(MAKECMDGOALS)),,$(all-deps-1))
  307. -include $(all-deps-2)
  308. # Include external dependency of firmwares after default Makefile rules
  309. include $(src_dir)/firmware/external_deps.mk
  310. # Convenient "make run" command for emulated platforms
  311. .PHONY: run
  312. run: all
  313. ifneq ($(platform-runcmd),)
  314. $(platform-runcmd) $(RUN_ARGS)
  315. else
  316. ifdef PLATFORM
  317. @echo "Platform $(PLATFORM) doesn't specify a run command"
  318. @false
  319. else
  320. @echo Run command only available when targeting a platform
  321. @false
  322. endif
  323. endif
  324. install_targets-y = install_libsbi
  325. install_targets-y += install_libsbiutils
  326. ifdef PLATFORM
  327. install_targets-y += install_libplatsbi
  328. install_targets-y += install_firmwares
  329. endif
  330. # Rule for "make install"
  331. .PHONY: install
  332. install: $(install_targets-y)
  333. .PHONY: install_libsbi
  334. install_libsbi: $(build_dir)/lib/libsbi.a
  335. $(call inst_header_dir,$(install_dir)/include,$(include_dir)/sbi)
  336. $(call inst_file,$(install_dir)/lib/libsbi.a,$(build_dir)/lib/libsbi.a)
  337. .PHONY: install_libsbiutils
  338. install_libsbiutils: $(build_dir)/lib/libsbiutils.a
  339. $(call inst_header_dir,$(install_dir)/include,$(include_dir)/sbi_utils)
  340. $(call inst_file,$(install_dir)/lib/libsbiutils.a,$(build_dir)/lib/libsbiutils.a)
  341. .PHONY: install_libplatsbi
  342. install_libplatsbi: $(platform_build_dir)/lib/libplatsbi.a $(build_dir)/lib/libsbi.a $(build_dir)/lib/libsbiutils.a
  343. $(call inst_file,$(install_dir)/platform/$(platform_subdir)/lib/libplatsbi.a,$(platform_build_dir)/lib/libplatsbi.a)
  344. .PHONY: install_firmwares
  345. install_firmwares: $(platform_build_dir)/lib/libplatsbi.a $(build_dir)/lib/libsbi.a $(build_dir)/lib/libsbiutils.a $(firmware-bins-path-y)
  346. $(call inst_file_list,$(install_dir),$(build_dir),platform/$(platform_subdir)/firmware,$(firmware-elfs-path-y))
  347. $(call inst_file_list,$(install_dir),$(build_dir),platform/$(platform_subdir)/firmware,$(firmware-bins-path-y))
  348. .PHONY: install_docs
  349. install_docs: $(build_dir)/docs/latex/refman.pdf
  350. $(call inst_file,$(install_dir)/docs/refman.pdf,$(build_dir)/docs/latex/refman.pdf)
  351. # Rule for "make clean"
  352. .PHONY: clean
  353. clean:
  354. $(CMD_PREFIX)mkdir -p $(build_dir)
  355. $(if $(V), @echo " RM $(build_dir)/*.o")
  356. $(CMD_PREFIX)find $(build_dir) -type f -name "*.o" -exec rm -rf {} +
  357. $(if $(V), @echo " RM $(build_dir)/*.a")
  358. $(CMD_PREFIX)find $(build_dir) -type f -name "*.a" -exec rm -rf {} +
  359. $(if $(V), @echo " RM $(build_dir)/*.elf")
  360. $(CMD_PREFIX)find $(build_dir) -type f -name "*.elf" -exec rm -rf {} +
  361. $(if $(V), @echo " RM $(build_dir)/*.bin")
  362. $(CMD_PREFIX)find $(build_dir) -type f -name "*.bin" -exec rm -rf {} +
  363. # Rule for "make distclean"
  364. .PHONY: distclean
  365. distclean: clean
  366. $(CMD_PREFIX)mkdir -p $(build_dir)
  367. $(if $(V), @echo " RM $(build_dir)/*.dep")
  368. $(CMD_PREFIX)find $(build_dir) -type f -name "*.dep" -exec rm -rf {} +
  369. ifeq ($(build_dir),$(CURDIR)/build)
  370. $(if $(V), @echo " RM $(build_dir)")
  371. $(CMD_PREFIX)rm -rf $(build_dir)
  372. endif
  373. ifeq ($(install_dir),$(CURDIR)/install)
  374. $(if $(V), @echo " RM $(install_dir)")
  375. $(CMD_PREFIX)rm -rf $(install_dir)
  376. endif