1# Copyright (c) 2023-2024 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14export PWD := $(abspath $(dir $(realpath $(lastword $(MAKEFILE_LIST)))))
15export TARGET_DIR := $(PWD)
16export BUILD_DIR = $(TARGET_DIR)/build
17export TARGET:=$(TARGET_DIR)/idl-gen
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