aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2024-10-05 00:58:12 +0200
committerJavier <dev.git@javispedro.com>2024-10-05 00:59:23 +0200
commitac93b512709187b8b29dbdb1c454813b6bb255ab (patch)
tree1a5d2dc1750ed299a0058db3a0345381e6fbd692 /Makefile
parentc2bffa687813222bc3f8fcc3c9e4bf92672fe7fa (diff)
downloadvmusic-ac93b512709187b8b29dbdb1c454813b6bb255ab.tar.gz
vmusic-ac93b512709187b8b29dbdb1c454813b6bb255ab.zip
autogenerate version headers from VirtualBox.src contents
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 82a3a85..827a299 100644
--- a/Makefile
+++ b/Makefile
@@ -62,7 +62,7 @@ VBOX_DEFINES:=-DVBOX_HAVE_VISIBILITY_HIDDEN -DRT_USE_VISIBILITY_DEFAULT -DVBOX -
VBOX_CFLAGS:=-fPIC -m64 -pedantic -Wshadow -Wall -Wextra \
-Wno-missing-field-initializers -Wno-unused -Wno-trigraphs -fdiagnostics-show-option -Wno-unused-parameter -Wlogical-op -Wno-variadic-macros -Wno-long-long -Wunused-variable -Wunused-function -Wunused-label -Wunused-parameter -Wno-array-bounds -Wno-ignored-qualifiers -Wno-variadic-macros -fno-omit-frame-pointer -fno-strict-aliasing \
-fvisibility=hidden -fno-exceptions \
- -I$(VBOXSRC)/include -Iinclude
+ -I$(VBOXSRC)/include -I$(OBJDIR)
VBOX_CXXFLAGS:=$(VBOX_CFLAGS) -Wno-overloaded-virtual -fvisibility-inlines-hidden -fno-rtti
VBOX_LDFLAGS:=-fPIC -m64
VBOX_LIBS:=$(VBOXBIN)/VBoxRT.$(SO)
@@ -86,7 +86,10 @@ build: $(OUTOSDIR)/VMusicMain.$(SO) $(OUTOSDIR)/VMusicMainVM.$(SO) $(OUTOSDIR)/A
$(OUTDIR) $(OBJDIR) $(OBJOSDIR) $(OUTOSDIR): %:
mkdir -p $@
-$(OBJOSDIR)/%.o: %.cpp | $(OBJOSDIR)
+$(OUTDIR)/version-generated.h: VirtualBox.src | $(OBJDIR)
+ ./scripts/generate_version_headers.sh
+
+$(OBJOSDIR)/%.o: %.cpp $(OUTDIR)/version-generated.h | $(OBJOSDIR)
$(CXX) -c $(VBOX_CXXFLAGS) $(VBOX_DEFINES) $(VMUSIC_DEFINES) $(CXXFLAGS) -o $@ $<
$(OBJOSDIR)/%.o: %.c | $(OBJOSDIR)