• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 Huawei Device Co., Ltd.
2#
3# HDF is dual licensed: you can use it either under the terms of
4# the GPL, or the BSD license, at your option.
5# See the LICENSE file in the root of this repository for complete details.
6
7ifeq ($(findstring ;, $(PATH)), ;)
8	export PWD:=$(subst /,\, $(abspath $(dir $(realpath $(lastword $(MAKEFILE_LIST))))))
9	export TARGET_DIR := $(PWD)
10	export BUILD_DIR:=$(TARGET_DIR)\build
11	export TARGET:=$(TARGET_DIR)\hdi-gen.exe
12else
13	export PWD := $(abspath $(dir $(realpath $(lastword $(MAKEFILE_LIST)))))
14	export TARGET_DIR := $(PWD)
15	export BUILD_DIR = $(TARGET_DIR)/build
16	export TARGET:=$(TARGET_DIR)/hdi-gen
17endif
18
19export CXXFLAGS = -std=c++14 -O2 -Wall -fno-common -fno-strict-aliasing -s
20export Q := @
21export MAKEFLAGS += --no-print-directory
22
23MAKE_FILE_NAME = MakefileLinux
24ifeq ($(findstring ;, $(PATH)), ;)
25	MAKE_FILE_NAME := MakefileWin
26endif
27
28all:
29	$(Q) echo start build $(TARGET) ...
30	$(Q) $(MAKE) -f $(MAKE_FILE_NAME)
31
32clean:
33	$(Q) $(MAKE) -f $(MAKE_FILE_NAME) clean
34
35.PHONY: clean