1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-21 00:25:37 +00:00

[cpp] All files suspected for any C++ relation renamed to cpp

Now (in meson) .c files are compiled by C compiler and .cpp by C++ compiler.
This commit is contained in:
Witold Filipczyk 2022-07-31 16:44:11 +02:00
parent d93d7ff6cf
commit 172c32a64c
33 changed files with 27 additions and 21 deletions

View File

@ -142,10 +142,13 @@ conf_data.set('HAVE_SYS_TIME_H', 1)
compiler = meson.get_compiler('c')
extracflags = []
extracppflags = []
if conf_data.get('CONFIG_ECMASCRIPT')
extracflags = ['-xc++', '-fpermissive', '-Wno-sign-compare', '-std=gnu++17']
extracppflags += ['-fpermissive', '-Wno-sign-compare', '-std=gnu++17']
else
extracflags = ['-Wc++-compat']
extracflags += ['-Wc++-compat']
endif
if compiler.has_header('wchar.h')

2
src/cache/Makefile vendored
View File

@ -1,6 +1,6 @@
top_builddir=../..
include $(top_builddir)/Makefile.config
OBJS = cache.o dialogs.o
OBJS = cache.obj dialogs.o
include $(top_srcdir)/Makefile.lib

View File

@ -1 +1 @@
srcs += files('cache.c', 'dialogs.c')
srcs += files('cache.cpp', 'dialogs.c')

View File

@ -3,6 +3,6 @@ include $(top_builddir)/Makefile.config
OBJS-$(CONFIG_EXMODE) += exmode.o
OBJS = document.o download.o edit.o info.o menu.o options.o progress.o status.o
OBJS = document.o download.o edit.o info.obj menu.o options.o progress.o status.o
include $(top_srcdir)/Makefile.lib

View File

@ -1,4 +1,4 @@
if conf_data.get('CONFIG_EXMODE')
srcs += files('exmode.c')
endif
srcs += files('document.c', 'download.c', 'edit.c', 'info.c', 'menu.c', 'options.c', 'progress.c', 'status.c')
srcs += files('document.c', 'download.c', 'edit.c', 'info.cpp', 'menu.c', 'options.c', 'progress.c', 'status.c')

View File

@ -7,6 +7,6 @@ SUBDIRS-$(CONFIG_XML) += xml
SUBDIRS = gemini html plain
OBJS = docdata.o document.o format.o forms.o options.o refresh.o renderer.o
OBJS = docdata.o document.obj format.o forms.o options.o refresh.o renderer.obj
include $(top_srcdir)/Makefile.lib

View File

@ -10,4 +10,4 @@ subdir('plain')
if conf_data.get('CONFIG_XML')
subdir('xml')
endif
srcs += files('docdata.c', 'document.c', 'format.c', 'forms.c', 'options.c', 'refresh.c', 'renderer.c')
srcs += files('docdata.c', 'document.cpp', 'format.c', 'forms.c', 'options.c', 'refresh.c', 'renderer.cpp')

View File

@ -3,6 +3,6 @@ include $(top_builddir)/Makefile.config
OBJS-$(CONFIG_INTERLINK) += interlink.o
OBJS = event.o main.o module.o select.o timer.o version.o
OBJS = event.o main.o module.obj select.o timer.obj version.o
include $(top_srcdir)/Makefile.lib

View File

@ -1,4 +1,4 @@
if conf_data.get('CONFIG_INTERLINK')
srcs += files('interlink.c')
endif
srcs += files('event.c', 'main.c', 'module.c', 'select.c', 'timer.c', 'version.c')
srcs += files('event.c', 'main.c', 'module.cpp', 'select.c', 'timer.cpp', 'version.c')

View File

@ -49,11 +49,14 @@ endif
extra_args += extracflags
extra_cpp_args = extra_args
extra_cpp_args += extracppflags
elinks = executable(
'elinks', srcs,
include_directories: incs,
dependencies: deps,
c_args: extra_args,
cpp_args: extra_args,
cpp_args: extra_cpp_args,
install: true
)

View File

@ -15,6 +15,6 @@ SUBDIRS = auth file http test
OBJS-$(CONFIG_DATA) += data.o
OBJS = about.o common.o date.o header.o protocol.o proxy.o uri.o user.o
OBJS = about.o common.o date.o header.o protocol.obj proxy.o uri.o user.o
include $(top_srcdir)/Makefile.lib

View File

@ -32,4 +32,4 @@ subdir('http')
if conf_data.get('CONFIG_DATA')
srcs += files('data.c')
endif
srcs += files('about.c', 'common.c', 'date.c', 'header.c', 'protocol.c', 'proxy.c', 'uri.c', 'user.c')
srcs += files('about.c', 'common.c', 'date.c', 'header.c', 'protocol.cpp', 'proxy.c', 'uri.c', 'user.c')

View File

@ -1,6 +1,6 @@
top_builddir=../..
include $(top_builddir)/Makefile.config
OBJS = download.o history.o location.o session.o task.o
OBJS = download.o history.o location.o session.obj task.o
include $(top_srcdir)/Makefile.lib

View File

@ -1 +1 @@
srcs += files('download.c', 'history.c', 'location.c', 'session.c', 'task.c')
srcs += files('download.c', 'history.c', 'location.c', 'session.cpp', 'task.c')

View File

@ -12,7 +12,7 @@ OBJS = \
kbd.o \
screen.o \
tab.o \
terminal.o \
terminal.obj \
window.o
include $(top_srcdir)/Makefile.lib

View File

@ -4,4 +4,4 @@ endif
if conf_data.get('CONFIG_TERMINFO')
srcs += files('terminfo.c')
endif
srcs += files('color.c', 'draw.c', 'event.c', 'hardio.c', 'kbd.c', 'screen.c', 'tab.c', 'terminal.c', 'window.c')
srcs += files('color.c', 'draw.c', 'event.c', 'hardio.c', 'kbd.c', 'screen.c', 'tab.c', 'terminal.cpp', 'window.c')

View File

@ -2,6 +2,6 @@ top_builddir=../..
include $(top_builddir)/Makefile.config
SUBDIRS = dump text
OBJS = action.o timer.o viewer.o
OBJS = action.obj timer.o viewer.o
include $(top_srcdir)/Makefile.lib

View File

@ -1,3 +1,3 @@
subdir('dump')
subdir('text')
srcs += files('action.c', 'timer.c', 'viewer.c')
srcs += files('action.cpp', 'timer.c', 'viewer.c')

View File

@ -5,6 +5,6 @@ INCLUDES += $(TRE_CFLAGS)
OBJS-$(CONFIG_MARKS) += marks.o
OBJS = draw.o form.o link.o search.o textarea.o view.o vs.o
OBJS = draw.o form.obj link.obj search.o textarea.o view.o vs.obj
include $(top_srcdir)/Makefile.lib

View File

@ -4,4 +4,4 @@ if conf_data.get('CONFIG_MARKS')
srcs += files('marks.c')
endif
srcs += files('draw.c', 'form.c', 'link.c', 'search.c', 'textarea.c', 'view.c', 'vs.c')
srcs += files('draw.c', 'form.cpp', 'link.cpp', 'search.c', 'textarea.c', 'view.c', 'vs.cpp')