summaryrefslogtreecommitdiff
path: root/erts/emulator/ryu/ryu.mk
blob: 524618f446ca35ceb12b4a1c39378a262291af16 (plain)
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
#-*-makefile-*-   ; force emacs to enter makefile-mode
# ----------------------------------------------------
# Make include file for Ryu
#
# %CopyrightBegin%
#
# Copyright Ericsson AB 2011-2021. 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%
#
# ----------------------------------------------------

RYU_FILES = d2s

RYU_OBJDIR = $(ERL_TOP)/erts/emulator/ryu/obj/$(TARGET)/$(TYPE)
RYU_OBJS = $(RYU_FILES:%=$(RYU_OBJDIR)/%.o)
RYU_DIR =  $(ERL_TOP)/erts/emulator/ryu

RYU_SRC = $(RYU_FILES:%=ryu/%.c)

ifeq ($(TARGET), win32)
RYU_LIBRARY = $(RYU_OBJDIR)/ryu.lib
else
RYU_LIBRARY = $(RYU_OBJDIR)/libryu.a
endif

ifeq ($(TARGET), win32)
RYU_CFLAGS = $(CFLAGS)
else
RYU_CFLAGS = $(filter-out -Wdeclaration-after-statement,$(CFLAGS))
endif

ifeq ($(TARGET), win32)
$(RYU_LIBRARY): $(RYU_OBJS)
	$(V_AR) -out:$@ $(RYU_OBJS)
else
$(RYU_LIBRARY): $(RYU_OBJS)
	$(V_AR) $(ARFLAGS) $@ $(RYU_OBJS)
	-@ ($(RANLIB) $@ || true) 2>/dev/null
endif



$(RYU_OBJDIR)/%.o: ryu/%.c
	$(V_CC) -c $(RYU_CFLAGS) -o $@ $<