mirror of
https://github.com/troglobit/libuev.git
synced 2026-11-03 12:38:25 +00:00
Remove STATIC ifdef, always build .a and .so files
It is non-trivial to set a separate environment variable (STATIC=1) when descending into the libuEv subdirectory from an autoconf/automake based project. It is better to instead simplify the build process and always build both .a and .so files. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
8a4e8c4af6
commit
6ffa76c2f8
1 file changed
+2
-10
@@ -50,18 +50,14 @@ HEADERS = uev.h private.h queue.h
|
|||||||
OBJS := uev.o io.o timer.o signal.o
|
OBJS := uev.o io.o timer.o signal.o
|
||||||
SRCS := $(OBJS:.o=.c)
|
SRCS := $(OBJS:.o=.c)
|
||||||
DEPS := $(SRCS:.c=.d)
|
DEPS := $(SRCS:.c=.d)
|
||||||
JUNK = *~ *.bak *.map .*.d DEADJOE *.gdb *.elf core core.* *.html
|
JUNK = *~ *.bak *.map .*.d *.so* *.a DEADJOE *.gdb *.elf core core.* *.html
|
||||||
|
|
||||||
VER = 1
|
VER = 1
|
||||||
LIBNAME = $(NAME)
|
LIBNAME = $(NAME)
|
||||||
SOLIB = $(LIBNAME).so.$(VER)
|
SOLIB = $(LIBNAME).so.$(VER)
|
||||||
SYMLIB = $(LIBNAME).so
|
SYMLIB = $(LIBNAME).so
|
||||||
STATICLIB = $(LIBNAME).a
|
STATICLIB = $(LIBNAME).a
|
||||||
ifdef STATIC
|
TARGET = $(STATICLIB) $(SOLIB)
|
||||||
TARGET = $(STATICLIB)
|
|
||||||
else
|
|
||||||
TARGET = $(SOLIB)
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Default install paths
|
# Default install paths
|
||||||
prefix ?= /usr/local
|
prefix ?= /usr/local
|
||||||
@@ -89,12 +85,10 @@ $(STATICLIB): Makefile $(OBJS)
|
|||||||
@$(AR) $(ARFLAGS) $@ $(OBJS)
|
@$(AR) $(ARFLAGS) $@ $(OBJS)
|
||||||
|
|
||||||
install-exec: all
|
install-exec: all
|
||||||
ifndef STATIC
|
|
||||||
@printf " INSTALL $(DESTDIR)$(libdir)/$(SOLIB)\n"
|
@printf " INSTALL $(DESTDIR)$(libdir)/$(SOLIB)\n"
|
||||||
@install -d $(DESTDIR)$(libdir)
|
@install -d $(DESTDIR)$(libdir)
|
||||||
@install $(SOLIB) $(DESTDIR)$(libdir)/$(SOLIB)
|
@install $(SOLIB) $(DESTDIR)$(libdir)/$(SOLIB)
|
||||||
@ln -sf $(SOLIB) $(DESTDIR)$(libdir)/$(SYMLIB)
|
@ln -sf $(SOLIB) $(DESTDIR)$(libdir)/$(SYMLIB)
|
||||||
endif
|
|
||||||
|
|
||||||
install-dev:
|
install-dev:
|
||||||
@install -d $(DESTDIR)$(incdir)/$(LIBNAME)
|
@install -d $(DESTDIR)$(incdir)/$(LIBNAME)
|
||||||
@@ -102,11 +96,9 @@ install-dev:
|
|||||||
printf " INSTALL $(DESTDIR)$(incdir)/$(LIBNAME)/$$file\n"; \
|
printf " INSTALL $(DESTDIR)$(incdir)/$(LIBNAME)/$$file\n"; \
|
||||||
install -m 0644 $$file $(DESTDIR)$(incdir)/$(LIBNAME)/$$file; \
|
install -m 0644 $$file $(DESTDIR)$(incdir)/$(LIBNAME)/$$file; \
|
||||||
done
|
done
|
||||||
ifdef STATIC
|
|
||||||
@printf " INSTALL $(DESTDIR)$(libdir)/$(STATICLIB)\n"
|
@printf " INSTALL $(DESTDIR)$(libdir)/$(STATICLIB)\n"
|
||||||
@install -d $(DESTDIR)$(libdir)
|
@install -d $(DESTDIR)$(libdir)
|
||||||
@install $(STATICLIB) $(DESTDIR)$(libdir)/$(STATICLIB)
|
@install $(STATICLIB) $(DESTDIR)$(libdir)/$(STATICLIB)
|
||||||
endif
|
|
||||||
@install -d $(DESTDIR)$(datadir)
|
@install -d $(DESTDIR)$(datadir)
|
||||||
@for file in $(DISTFILES); do \
|
@for file in $(DISTFILES); do \
|
||||||
printf " INSTALL $(DESTDIR)$(datadir)/$$file\n"; \
|
printf " INSTALL $(DESTDIR)$(datadir)/$$file\n"; \
|
||||||
|
|||||||
Reference in new issue
Block a user