mirror of
https://gitlab.freedesktop.org/libbsd/libbsd.git
synced 2025-10-20 05:49:08 +02:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
391c75b427 | ||
![]() |
45783ae4ca | ||
![]() |
5902730a03 | ||
![]() |
42601170ac | ||
![]() |
0bd48c4a4d |
31
Makefile
31
Makefile
@@ -1,7 +1,7 @@
|
|||||||
LIB_NAME := libbsd
|
LIB_NAME := libbsd
|
||||||
LIB_VERSION_MAJOR := 0
|
LIB_VERSION_MAJOR := 0
|
||||||
LIB_VERSION_MINOR := 1
|
LIB_VERSION_MINOR := 1
|
||||||
LIB_VERSION_MICRO := 3
|
LIB_VERSION_MICRO := 4
|
||||||
LIB_VERSION := $(LIB_VERSION_MAJOR).$(LIB_VERSION_MINOR).$(LIB_VERSION_MICRO)
|
LIB_VERSION := $(LIB_VERSION_MAJOR).$(LIB_VERSION_MINOR).$(LIB_VERSION_MICRO)
|
||||||
|
|
||||||
LIB_PKGCONFIG := $(LIB_NAME).pc
|
LIB_PKGCONFIG := $(LIB_NAME).pc
|
||||||
@@ -82,13 +82,13 @@ CFLAGS ?= -g -Wall -Wextra -Wno-unused-variable
|
|||||||
|
|
||||||
MK_CFLAGS := -Iinclude/ -include bsd/bsd.h -D_GNU_SOURCE -D__REENTRANT
|
MK_CFLAGS := -Iinclude/ -include bsd/bsd.h -D_GNU_SOURCE -D__REENTRANT
|
||||||
|
|
||||||
prefix := /usr
|
prefix = /usr
|
||||||
exec_prefix :=
|
exec_prefix =
|
||||||
libdir := ${exec_prefix}/lib
|
libdir = ${exec_prefix}/lib
|
||||||
usrlibdir := ${prefix}/lib
|
usrlibdir = ${prefix}/lib
|
||||||
includedir := ${prefix}/include
|
includedir = ${prefix}/include
|
||||||
pkgconfigdir := ${usrlibdir}/pkgconfig
|
pkgconfigdir = ${usrlibdir}/pkgconfig
|
||||||
mandir := ${prefix}/share/man
|
mandir = ${prefix}/share/man
|
||||||
|
|
||||||
.PHONY: libs
|
.PHONY: libs
|
||||||
libs: $(LIB_STATIC) $(LIB_SHARED_SO) $(LIB_PKGCONFIG)
|
libs: $(LIB_STATIC) $(LIB_SHARED_SO) $(LIB_PKGCONFIG)
|
||||||
@@ -108,13 +108,12 @@ man/md5.3bsd: man/mdX.3
|
|||||||
src/hash/md5hl.c: src/hash/helper.c
|
src/hash/md5hl.c: src/hash/helper.c
|
||||||
sed -e 's:hashinc:bsd/md5.h:g' -e 's:HASH:MD5:g' $< > $@
|
sed -e 's:hashinc:bsd/md5.h:g' -e 's:HASH:MD5:g' $< > $@
|
||||||
|
|
||||||
# FIXME: the variables should be preserved unexpanded in the .pc file
|
|
||||||
$(LIB_PKGCONFIG): $(LIB_PKGCONFIG).in
|
$(LIB_PKGCONFIG): $(LIB_PKGCONFIG).in
|
||||||
sed -e 's:@VERSION@:$(LIB_VERSION):' \
|
sed -e 's:@VERSION@:$(LIB_VERSION):' \
|
||||||
-e 's:@prefix@:$(prefix):' \
|
-e 's:@prefix@:$(value prefix):' \
|
||||||
-e 's:@exec_prefix@:$(exec_prefix):' \
|
-e 's:@exec_prefix@:$(value exec_prefix):' \
|
||||||
-e 's:@libdir@:$(libdir):' \
|
-e 's:@libdir@:$(value usrlibdir):' \
|
||||||
-e 's:@includedir@:$(includedir):' \
|
-e 's:@includedir@:$(value includedir):' \
|
||||||
$< > $@
|
$< > $@
|
||||||
|
|
||||||
$(LIB_STATIC): $(LIB_STATIC_OBJS)
|
$(LIB_STATIC): $(LIB_STATIC_OBJS)
|
||||||
@@ -158,7 +157,13 @@ install: libs man
|
|||||||
done
|
done
|
||||||
install -m644 $(LIB_MANS) $(DESTDIR)/$(mandir)/man3
|
install -m644 $(LIB_MANS) $(DESTDIR)/$(mandir)/man3
|
||||||
install -m644 $(LIB_PKGCONFIG) $(DESTDIR)/$(pkgconfigdir)
|
install -m644 $(LIB_PKGCONFIG) $(DESTDIR)/$(pkgconfigdir)
|
||||||
|
ifeq ($(libdir),$(usrlibdir))
|
||||||
|
# If both dirs are the same, do a relative symlink.
|
||||||
|
ln -sf $(LIB_SHARED) $(DESTDIR)/$(usrlibdir)/$(LIB_SHARED_SO)
|
||||||
|
else
|
||||||
|
# Otherwise, do an absolute one.
|
||||||
ln -sf $(libdir)/$(LIB_SHARED) $(DESTDIR)/$(usrlibdir)/$(LIB_SHARED_SO)
|
ln -sf $(libdir)/$(LIB_SHARED) $(DESTDIR)/$(usrlibdir)/$(LIB_SHARED_SO)
|
||||||
|
endif
|
||||||
ln -sf $(LIB_SHARED) $(DESTDIR)/$(libdir)/$(LIB_SONAME)
|
ln -sf $(LIB_SHARED) $(DESTDIR)/$(libdir)/$(LIB_SONAME)
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
|
@@ -57,6 +57,9 @@ static char sccsid[] = "@(#)nlist.c 8.1 (Berkeley) 6/4/93";
|
|||||||
|
|
||||||
#ifdef _NLIST_DO_AOUT
|
#ifdef _NLIST_DO_AOUT
|
||||||
static int __aout_fdnlist(int, struct nlist *);
|
static int __aout_fdnlist(int, struct nlist *);
|
||||||
|
#ifndef N_SYMSIZE
|
||||||
|
#define N_SYMSIZE(a) ((a).a_syms)
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef _NLIST_DO_ELF
|
#ifdef _NLIST_DO_ELF
|
||||||
static int __elf_fdnlist(int, struct nlist *);
|
static int __elf_fdnlist(int, struct nlist *);
|
||||||
|
Reference in New Issue
Block a user