#
# %CopyrightBegin%
#
# Copyright Ericsson AB 2023. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# %CopyrightEnd%
#

include $(ERL_TOP)/make/target.mk

# ----------------------------------------------------
# Configuration info.
# ----------------------------------------------------
include $(ERL_TOP)/make/$(TARGET)/otp.mk

# ----------------------------------------------------
# Release directory specification
# ----------------------------------------------------
PROPEREXTDIR = $(RELEASE_PATH)/lib/common_test-$(VSN)/proper_ext

# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------

EBIN=.

MODULES= \
	ct_proper_ext

TARGET_MODULES= $(MODULES:%=$(EBIN)/%)
TARGET_MODULES= $(MODULES:%=$(EBIN)/%)

ERL_FILES = $(MODULES:=.erl)
HRL_FILES =

TARGET_FILES = $(MODULES:%=$(EBIN)/%.$(EMULATOR))

TARGETS = $(MODULES:%=$(EBIN)/%.$(EMULATOR))

# ----------------------------------------------------
# FLAGS
# ----------------------------------------------------
ERL_COMPILE_FLAGS += -I../include -Werror

# ----------------------------------------------------
# Targets
# ----------------------------------------------------

tests $(TYPES): $(TARGETS)

clean:
	rm -f $(TARGET_FILES)
	rm -f core

docs:

# ----------------------------------------------------
# Special Build Targets
# ----------------------------------------------------

# ----------------------------------------------------
# Release Target
# ----------------------------------------------------
include $(ERL_TOP)/make/otp_release_targets.mk

release_spec: opt
	$(INSTALL_DIR) "$(PROPEREXTDIR)"
	$(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) \
		$(TARGET_FILES) \
		"$(PROPEREXTDIR)"

release_docs_spec:
