diff --git a/include/wasm/.gitignore b/include/wasm/.gitignore deleted file mode 100644 index e27b5465e..000000000 --- a/include/wasm/.gitignore +++ /dev/null @@ -1 +0,0 @@ -math.h \ No newline at end of file diff --git a/include/wasm/math.h b/include/wasm/math.h new file mode 100644 index 000000000..b7918c3bd --- /dev/null +++ b/include/wasm/math.h @@ -0,0 +1,32 @@ +/**************************************************************************** + * apps/include/wasm/math.h + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you 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. + * + ****************************************************************************/ + +#ifndef __INCLUDE_WASM_MATH_H +#define __INCLUDE_WASM_MATH_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +/* Forwards math.h to nuttx/include/nuttx/lib/math.h */ + +#include + +#endif /* __INCLUDE_WASM_MATH_H */ diff --git a/tools/Wasm.mk b/tools/Wasm.mk index 4c6d20d60..28627c115 100644 --- a/tools/Wasm.mk +++ b/tools/Wasm.mk @@ -75,20 +75,12 @@ WAMR_MODE ?= INT WSRCS := $(MAINSRC) $(CSRCS) WOBJS := $(WSRCS:=$(SUFFIX).wo) -# Copy math.h from $(TOPDIR)/include/nuttx/lib/math.h to $(APPDIR)/include/wasm/math.h -# Using declaration of math.h is OK for Wasm build - -$(APPDIR)$(DELIM)include$(DELIM)wasm$(DELIM)math.h: -ifeq ($(CONFIG_LIBM),) - $(call COPYFILE,$(TOPDIR)$(DELIM)include$(DELIM)nuttx$(DELIM)lib$(DELIM)math.h,$@) -endif - all:: $(WBIN) $(BINDIR)/wasm: $(Q) mkdir -p $(BINDIR)/wasm -depend:: $(APPDIR)$(DELIM)include$(DELIM)wasm$(DELIM)math.h $(BINDIR)/wasm +depend:: $(BINDIR)/wasm $(WOBJS): %.c$(SUFFIX).wo : %.c $(Q) $(WCC) $(WCFLAGS) -c $^ -o $@ @@ -108,7 +100,6 @@ $(WBIN): $(WOBJS) clean:: $(call DELFILE, $(WOBJS)) $(call DELFILE, $(WBIN)) - $(call DELFILE, $(APPDIR)$(DELIM)include$(DELIM)wasm$(DELIM)math.h) endif # WASM_BUILD