Upgraded to latest version
This commit is contained in:
parent
4b6491736e
commit
8969aa4686
15
Makefile
15
Makefile
@ -70,7 +70,7 @@ ifeq ($(UNAME_S),Linux)
|
||||
$(CXX) -g -shared -Wl,-soname,$(SONAME) -o $(OUTDIR)$(REALNAME) $(LDFLAGS) $(LDLIBS) $(addprefix $(BUILDDIR),$(OBJS))
|
||||
endif
|
||||
|
||||
%.o: %.cpp %.d Makefile
|
||||
%.o: %.cpp %.d
|
||||
$(CXX) $(CXXFLAGS) -MMD -MP -MT $@ -MF $*.d -c $<
|
||||
@mv $@ $*.d $(BUILDDIR)
|
||||
|
||||
@ -81,6 +81,7 @@ endif
|
||||
$(OUTDIR)$(STATICLIB): $(OBJS)
|
||||
ar r $(OUTDIR)$(STATICLIB) $(addprefix $(BUILDDIR),$(OBJS))
|
||||
|
||||
ifeq ($(GENERATELIBHEADER),1)
|
||||
$(LIBNAME).hpp: $(HDRS)
|
||||
@echo updating build/$(LIBNAME).hpp
|
||||
@cp /dev/null build/$(LIBNAME).hpp
|
||||
@ -88,6 +89,10 @@ $(LIBNAME).hpp: $(HDRS)
|
||||
do \
|
||||
cat $$h >> build/$(LIBNAME).hpp; \
|
||||
done
|
||||
HEADERSRCDIR := build
|
||||
else
|
||||
HEADERSRCDIR := src
|
||||
endif
|
||||
|
||||
test:
|
||||
$(MAKE) -C tests && tests/tests
|
||||
@ -96,11 +101,15 @@ clean:
|
||||
$(RM) build
|
||||
$(MAKE) -C tests clean
|
||||
|
||||
install: $(OUTDIR)$(REALNAME) $(LIBNAME).hpp
|
||||
ifeq ($(GENERATELIBHEADER),1)
|
||||
install: $(LIBNAME).hpp
|
||||
else
|
||||
install:
|
||||
endif
|
||||
$(INSTALL) -d $(LIBDIR)
|
||||
$(INSTALL) -m 644 $(OUTDIR)$(REALNAME) $(LIBDIR)
|
||||
$(INSTALL) -d $(INCLUDEDIR)
|
||||
$(INSTALL) -m 644 build/$(LIBNAME).hpp $(INCLUDEDIR)
|
||||
$(INSTALL) -m 644 $(HEADERSRCDIR)/$(LIBNAME).hpp $(INCLUDEDIR)
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
cd $(LIBDIR) && ln -sf $(REALNAME) $(SONAME)
|
||||
endif
|
||||
|
@ -3,3 +3,5 @@ LDLIBS :=
|
||||
MAJOR := 1
|
||||
MINOR := 0
|
||||
PATCH := 0
|
||||
|
||||
GENERATELIBHEADER := 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user