mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
netlist: stand-alone build fixes and improvements. (nw)
This commit is contained in:
parent
47a8f8c2bb
commit
e0a5fca0d5
3
src/lib/netlist/.gitignore
vendored
3
src/lib/netlist/.gitignore
vendored
@ -7,3 +7,6 @@ nltool
|
||||
nlwav
|
||||
nltool.exe
|
||||
nlwav.exe
|
||||
doxygen
|
||||
doxyindexer
|
||||
doxysearch.cgi
|
||||
|
@ -23,7 +23,6 @@
|
||||
SRC = ..
|
||||
VSBUILD = $(SRC)/buildVS
|
||||
DOC = $(SRC)/documentation
|
||||
TIDY_DB = ../compile_commands.json
|
||||
|
||||
TIDY_FLAGSX = -checks=*,-google*,-hicpp*,readability*,-fuchsia*,cert-*,-android-*,
|
||||
TIDY_FLAGSX += -llvm-header-guard,-cppcoreguidelines-pro-type-reinterpret-cast,
|
||||
@ -33,16 +32,18 @@ TIDY_FLAGSX += -modernize-pass-by-value,-cppcoreguidelines-pro-type-static-cast-
|
||||
#TIDY_FLAGSX += -cppcoreguidelines-avoid-magic-numbers,
|
||||
TIDY_FLAGSX += -cppcoreguidelines-macro-usage,
|
||||
#TIDY_FLAGSX += -cppcoreguidelines-non-private-member-variables-in-classes,-misc-non-private-member-variables-in-classes,
|
||||
TIDY_FLAGSX += -bugprone-macro-parentheses,-misc-macro-parentheses,
|
||||
TIDY_FLAGSX += -bugprone-macro-parentheses,
|
||||
#TIDY_FLAGSX += -misc-macro-parentheses,
|
||||
TIDY_FLAGSX += -bugprone-too-small-loop-variable,
|
||||
TIDY_FLAGSX += -modernize-use-trailing-return-type,
|
||||
TIDY_FLAGSX += -cppcoreguidelines-pro-bounds-array-to-pointer-decay,
|
||||
TIDY_FLAGSX += -readability-magic-numbers,-readability-implicit-bool-conversion,-readability-braces-around-statements,
|
||||
TIDY_FLAGSX += -readability-named-parameter,-readability-function-size
|
||||
TIDY_FLAGSX += -readability-named-parameter,-readability-function-size,
|
||||
TIDY_FLAGSX += -llvmlibc-restrict-system-libc-headers,-llvmlibc-implementation-in-namespace
|
||||
|
||||
space :=
|
||||
space +=
|
||||
TIDY_FLAGS = $(subst $(space),,$(TIDY_FLAGSX))
|
||||
TIDY_FLAGS = -p $(OBJ) $(subst $(space),,$(TIDY_FLAGSX))
|
||||
TIDY_SOURCES = $(SOURCES)
|
||||
|
||||
#TIDY_SOURCES = $(SRC)/devices/nld_7442.cpp $(SRC)/devices/nld_7492.cpp
|
||||
@ -65,7 +66,8 @@ DOXYGEN = @./doxygen
|
||||
HOSTARCH = NIX
|
||||
endif
|
||||
|
||||
#-fuse-ld=gold -Wpedantic -march=native -march=native
|
||||
TIDY_DB = $(OBJ)/compile_commands.json
|
||||
|
||||
|
||||
# LTO = -flto=4 -fuse-linker-plugin -flto-partition=balanced -Wodr
|
||||
|
||||
@ -77,7 +79,7 @@ CC = g++
|
||||
LD = @g++
|
||||
MD = @mkdir
|
||||
RM = @rm
|
||||
CLANG_TIDY = clang-tidy-10
|
||||
CLANG_TIDY = clang-tidy-11
|
||||
|
||||
ifndef FAST
|
||||
FAST=1
|
||||
@ -92,6 +94,8 @@ TARGETS = nltool$(EXESUFFIX) nlwav$(EXESUFFIX)
|
||||
NLOBJ = $(OBJ)
|
||||
POBJ = $(OBJ)/plib
|
||||
|
||||
DEPEND = $(OBJ)/.depend
|
||||
|
||||
OBJDIRS = $(OBJ) \
|
||||
$(OBJ)/analog \
|
||||
$(OBJ)/solver \
|
||||
@ -223,18 +227,24 @@ MAKEFILE_TARGETS_WITHOUT_INCLUDE := clean doc clang mingw nvcc
|
||||
# git archive HEAD --prefix=project-name-version/ \
|
||||
# --format=zip -o project-name-version.zip
|
||||
|
||||
#-------------------------------------------------
|
||||
# PHONY
|
||||
#-------------------------------------------------
|
||||
|
||||
.PHONY: clang clang-5 mingw doc native maketree depend $(DEPEND)
|
||||
|
||||
#-------------------------------------------------
|
||||
# all
|
||||
#-------------------------------------------------
|
||||
|
||||
all: maketree depend $(TARGETS)
|
||||
all: maketree depend $(TARGETS)
|
||||
|
||||
#-------------------------------------------------
|
||||
# clean
|
||||
#-------------------------------------------------
|
||||
|
||||
clean:
|
||||
$(RM) -rf $(OBJS) $(TARGETS) $(OBJ)/prg/nltool.o $(OBJ)/prg/nlwav.o .depend doxy/*
|
||||
$(RM) -rf $(OBJS) $(TARGETS) $(OBJ)/prg/nltool.o $(OBJ)/prg/nlwav.o $(DEPEND) doxy/*
|
||||
|
||||
#-------------------------------------------------
|
||||
# nltool
|
||||
@ -248,6 +258,7 @@ nlwav$(EXESUFFIX): $(OBJ)/prg/nlwav.o $(PMAIN) $(OBJS)
|
||||
@echo Linking $@...
|
||||
$(LD) -o $@ $(LDFLAGS) $^ $(LIBS)
|
||||
|
||||
|
||||
#-------------------------------------------------
|
||||
# directories
|
||||
#-------------------------------------------------
|
||||
@ -261,8 +272,6 @@ maketree: $(sort $(OBJDIRS))
|
||||
# Special targets
|
||||
#-------------------------------------------------
|
||||
|
||||
.PHONY: clang clang-5 mingw doc native
|
||||
|
||||
native:
|
||||
$(MAKE) CEXTRAFLAGS="-march=native -msse4.2 -Wall -Wpedantic -Wsign-compare -Wextra "
|
||||
|
||||
@ -312,18 +321,18 @@ doc: nltool$(EXESUFFIX)
|
||||
# depends
|
||||
#-------------------------------------------------
|
||||
|
||||
.depend: $(SOURCES)
|
||||
@echo creating .depend
|
||||
@rm -f ./.depend
|
||||
$(DEPEND): maketree $(SOURCES)
|
||||
@echo creating $(DEPEND)
|
||||
@rm -f $(DEPEND)
|
||||
@for i in $(SOURCES); do \
|
||||
$(CC) $(CFLAGS) -MM $$i -MT `echo $$i | sed -e 's+$(SRC)+$(OBJ)+' -e 's+.cpp+.o+' ` >> ./.depend; \
|
||||
$(CC) $(CFLAGS) -MM $$i -MT `echo $$i | sed -e 's+$(SRC)+$(OBJ)+' -e 's+.cpp+.o+' ` >> $(DEPEND); \
|
||||
done
|
||||
|
||||
depend: .depend
|
||||
depend: $(DEPEND)
|
||||
|
||||
# Include only if the goal needs it
|
||||
ifeq ($(filter $(MAKECMDGOALS),$(MAKEFILE_TARGETS_WITHOUT_INCLUDE)),)
|
||||
-include .depend
|
||||
-include $(DEPEND)
|
||||
endif
|
||||
|
||||
#-------------------------------------------------
|
||||
|
@ -117,6 +117,7 @@
|
||||
<ClCompile Include="..\devices\nld_2102A.cpp" />
|
||||
<ClCompile Include="..\devices\nld_2716.cpp" />
|
||||
<ClCompile Include="..\devices\nld_4006.cpp" />
|
||||
<ClCompile Include="..\devices\nld_74393.cpp" />
|
||||
<ClCompile Include="..\devices\nld_7442.cpp" />
|
||||
<ClCompile Include="..\devices\nld_7492.cpp" />
|
||||
<ClCompile Include="..\devices\nld_7497.cpp" />
|
||||
@ -204,6 +205,7 @@
|
||||
<ClInclude Include="..\devices\net_lib.h" />
|
||||
<ClInclude Include="..\devices\nld_2102A.h" />
|
||||
<ClInclude Include="..\devices\nld_2716.h" />
|
||||
<ClInclude Include="..\devices\nld_74393.h" />
|
||||
<ClInclude Include="..\devices\nld_7442.h" />
|
||||
<ClInclude Include="..\devices\nld_7497.h" />
|
||||
<ClInclude Include="..\devices\nld_schmitt.h" />
|
||||
|
@ -264,6 +264,9 @@
|
||||
<ClCompile Include="..\generated\static_solvers.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\devices\nld_74393.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\nl_errstr.h">
|
||||
@ -635,5 +638,8 @@
|
||||
<ClInclude Include="..\devices\nld_7442.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\devices\nld_74393.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user