Skip to content

Commit ab928ba

Browse files
Andrew WatermanAndrew Waterman
authored andcommitted
[sim] made softfloat files C instead of C++
1 parent d3cb781 commit ab928ba

File tree

113 files changed

+129
-114
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+129
-114
lines changed

Makefile.in

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,14 @@ VPATH := $(addprefix $(src_dir)/, $(sprojs_enabled))
8282
# - CPPFLAGS : flags for the preprocessor (eg. -I,-D)
8383
# - CXXFLAGS : flags for C++ compiler (eg. -Wall,-g,-O3)
8484

85+
CC := @CC@
8586
CXX := @CXX@
8687
CPPFLAGS := @CPPFLAGS@
8788
CXXFLAGS := @CXXFLAGS@
8889
COMPILE := $(CXX) -MMD -MP $(CPPFLAGS) $(CXXFLAGS) \
8990
$(sprojs_include)
91+
COMPILE_C := $(CC) -MMD -MP $(CPPFLAGS) $(CXXFLAGS) \
92+
$(sprojs_include)
9093
# Linker
9194
# - LDFLAGS : Flags for the linker (eg. -L)
9295
# - LIBS : Library flags (eg. -l)
@@ -169,7 +172,7 @@ define subproject_template
169172
# system will create a library for this subproject with just the
170173
# corresponding dummy object file.
171174

172-
ifeq ($$(strip $$($(2)_srcs)),)
175+
ifeq ($$(strip $$($(2)_srcs) $$($(2)_c_srcs)),)
173176
$(2)_srcs += _$(1).cc
174177
$(2)_junk += _$(1).cc
175178
endif
@@ -180,15 +183,19 @@ _$(1).cc :
180183
# Build the object files for this subproject
181184

182185
$(2)_objs := $$(patsubst %.cc, %.o, $$($(2)_srcs))
186+
$(2)_c_objs := $$(patsubst %.c, %.o, $$($(2)_c_srcs))
183187
$(2)_deps := $$(patsubst %.o, %.d, $$($(2)_objs))
188+
$(2)_c_deps := $$(patsubst %.o, %.d, $$($(2)_c_objs))
184189
$$($(2)_objs) : %.o : %.cc
185190
$(COMPILE) -c $$<
191+
$$($(2)_c_objs) : %.o : %.c
192+
$(COMPILE_C) -c $$<
186193

187-
$(2)_junk += $$($(2)_objs) $$($(2)_deps)
194+
$(2)_junk += $$($(2)_objs) $$($(2)_c_objs) $$($(2)_deps) $$($(2)_c_deps)
188195

189196
# Build a library for this subproject
190197

191-
lib$(1).a : $$($(2)_objs)
198+
lib$(1).a : $$($(2)_objs) $$($(2)_c_objs)
192199
$(AR) rcv $$@ $$^
193200
$(RANLIB) $$@
194201

File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)