replaced bu latest version

This commit is contained in:
Bob Polis 2021-12-21 14:53:06 +01:00
parent c2e8f440b4
commit 40a535b228

View File

@ -70,7 +70,7 @@ ifeq ($(UNAME_S),Linux)
$(CXX) -g -shared -Wl,-soname,$(SONAME) -o $(OUTDIR)$(REALNAME) $(LDFLAGS) $(LDLIBS) $(addprefix $(BUILDDIR),$(OBJS)) $(CXX) -g -shared -Wl,-soname,$(SONAME) -o $(OUTDIR)$(REALNAME) $(LDFLAGS) $(LDLIBS) $(addprefix $(BUILDDIR),$(OBJS))
endif endif
%.o: %.cpp %.d Makefile %.o: %.cpp %.d
$(CXX) $(CXXFLAGS) -MMD -MP -MT $@ -MF $*.d -c $< $(CXX) $(CXXFLAGS) -MMD -MP -MT $@ -MF $*.d -c $<
@mv $@ $*.d $(BUILDDIR) @mv $@ $*.d $(BUILDDIR)
@ -81,6 +81,7 @@ endif
$(OUTDIR)$(STATICLIB): $(OBJS) $(OUTDIR)$(STATICLIB): $(OBJS)
ar r $(OUTDIR)$(STATICLIB) $(addprefix $(BUILDDIR),$(OBJS)) ar r $(OUTDIR)$(STATICLIB) $(addprefix $(BUILDDIR),$(OBJS))
ifeq ($(GENERATELIBHEADER),1)
$(LIBNAME).hpp: $(HDRS) $(LIBNAME).hpp: $(HDRS)
@echo updating build/$(LIBNAME).hpp @echo updating build/$(LIBNAME).hpp
@cp /dev/null build/$(LIBNAME).hpp @cp /dev/null build/$(LIBNAME).hpp
@ -88,6 +89,10 @@ $(LIBNAME).hpp: $(HDRS)
do \ do \
cat $$h >> build/$(LIBNAME).hpp; \ cat $$h >> build/$(LIBNAME).hpp; \
done done
HEADERSRCDIR := build
else
HEADERSRCDIR := src
endif
test: test:
$(MAKE) -C tests && tests/tests $(MAKE) -C tests && tests/tests
@ -96,11 +101,11 @@ clean:
$(RM) build $(RM) build
$(MAKE) -C tests clean $(MAKE) -C tests clean
install: $(OUTDIR)$(REALNAME) $(LIBNAME).hpp install:
$(INSTALL) -d $(LIBDIR) $(INSTALL) -d $(LIBDIR)
$(INSTALL) -m 644 $(OUTDIR)$(REALNAME) $(LIBDIR) $(INSTALL) -m 644 $(OUTDIR)$(REALNAME) $(LIBDIR)
$(INSTALL) -d $(INCLUDEDIR) $(INSTALL) -d $(INCLUDEDIR)
$(INSTALL) -m 644 build/$(LIBNAME).hpp $(INCLUDEDIR) $(INSTALL) -m 644 $(HEADERSRCDIR)/$(LIBNAME).hpp $(INCLUDEDIR)
ifeq ($(UNAME_S),Darwin) ifeq ($(UNAME_S),Darwin)
cd $(LIBDIR) && ln -sf $(REALNAME) $(SONAME) cd $(LIBDIR) && ln -sf $(REALNAME) $(SONAME)
endif endif