mirror of
https://gitlab.freedesktop.org/libbsd/libbsd.git
synced 2025-10-19 12:42:33 +02:00
Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
56f2e55b7a | ||
![]() |
5ac14531b5 | ||
![]() |
2543c5a78b | ||
![]() |
33ef70b9e1 | ||
![]() |
8ef0ecdf44 | ||
![]() |
6660397589 | ||
![]() |
391c75b427 | ||
![]() |
45783ae4ca | ||
![]() |
5902730a03 | ||
![]() |
42601170ac | ||
![]() |
0bd48c4a4d |
31
Makefile
31
Makefile
@@ -1,7 +1,7 @@
|
||||
LIB_NAME := libbsd
|
||||
LIB_VERSION_MAJOR := 0
|
||||
LIB_VERSION_MINOR := 1
|
||||
LIB_VERSION_MICRO := 3
|
||||
LIB_VERSION_MICRO := 6
|
||||
LIB_VERSION := $(LIB_VERSION_MAJOR).$(LIB_VERSION_MINOR).$(LIB_VERSION_MICRO)
|
||||
|
||||
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
|
||||
|
||||
prefix := /usr
|
||||
exec_prefix :=
|
||||
libdir := ${exec_prefix}/lib
|
||||
usrlibdir := ${prefix}/lib
|
||||
includedir := ${prefix}/include
|
||||
pkgconfigdir := ${usrlibdir}/pkgconfig
|
||||
mandir := ${prefix}/share/man
|
||||
prefix = /usr
|
||||
exec_prefix =
|
||||
libdir = ${exec_prefix}/lib
|
||||
usrlibdir = ${prefix}/lib
|
||||
includedir = ${prefix}/include
|
||||
pkgconfigdir = ${usrlibdir}/pkgconfig
|
||||
mandir = ${prefix}/share/man
|
||||
|
||||
.PHONY: libs
|
||||
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
|
||||
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
|
||||
sed -e 's:@VERSION@:$(LIB_VERSION):' \
|
||||
-e 's:@prefix@:$(prefix):' \
|
||||
-e 's:@exec_prefix@:$(exec_prefix):' \
|
||||
-e 's:@libdir@:$(libdir):' \
|
||||
-e 's:@includedir@:$(includedir):' \
|
||||
-e 's:@prefix@:$(value prefix):' \
|
||||
-e 's:@exec_prefix@:$(value exec_prefix):' \
|
||||
-e 's:@libdir@:$(value usrlibdir):' \
|
||||
-e 's:@includedir@:$(value includedir):' \
|
||||
$< > $@
|
||||
|
||||
$(LIB_STATIC): $(LIB_STATIC_OBJS)
|
||||
@@ -158,7 +157,13 @@ install: libs man
|
||||
done
|
||||
install -m644 $(LIB_MANS) $(DESTDIR)/$(mandir)/man3
|
||||
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)
|
||||
endif
|
||||
ln -sf $(LIB_SHARED) $(DESTDIR)/$(libdir)/$(LIB_SONAME)
|
||||
|
||||
.PHONY: clean
|
||||
|
@@ -37,6 +37,10 @@
|
||||
# define __dead2
|
||||
#endif
|
||||
|
||||
#ifndef __pure2
|
||||
# define __pure2
|
||||
#endif
|
||||
|
||||
/* Linux headers define a struct with a member names __unused.
|
||||
* Disable for now. */
|
||||
#if 0
|
||||
@@ -69,4 +73,20 @@
|
||||
# define __FBSDID(x)
|
||||
#endif
|
||||
|
||||
#ifndef __RCSID
|
||||
# define __RCSID(x)
|
||||
#endif
|
||||
|
||||
#ifndef __RCSID_SOURCE
|
||||
# define __RCSID_SOURCE
|
||||
#endif
|
||||
|
||||
#ifndef __SCCSID
|
||||
# define __SCCSID
|
||||
#endif
|
||||
|
||||
#ifndef __COPYRIGHT
|
||||
# define __COPYRIGHT
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@@ -66,7 +66,7 @@
|
||||
#endif
|
||||
#define ELF_TARG_MACH EM_AVR32
|
||||
#define ELF_TARG_CLASS ELFCLASS32
|
||||
#if define(__LITTLE_ENDIAN__)
|
||||
#if defined(__LITTLE_ENDIAN__)
|
||||
#define ELF_TARG_DATA ELFDATA2LSB
|
||||
#elif defined(__BIG_ENDIAN__)
|
||||
#define ELF_TARG_DATA ELFDATA2LMSB
|
||||
@@ -97,9 +97,9 @@
|
||||
#define ELF_TARG_MACH EM_M32R
|
||||
#define ELF_TARG_CLASS ELFCLASS32
|
||||
#if defined(__LITTLE_ENDIAN__)
|
||||
#define ELF_DATA ELFDATA2LSB
|
||||
#define ELF_TARG_DATA ELFDATA2LSB
|
||||
#elif defined(__BIG_ENDIAN__)
|
||||
#define ELF_DATA ELFDATA2MSB
|
||||
#define ELF_TARG_DATA ELFDATA2MSB
|
||||
#else
|
||||
#error Unknown M32R endianness
|
||||
#endif
|
||||
@@ -147,7 +147,7 @@
|
||||
|
||||
#define ELF_TARG_MACH EM_SH
|
||||
#define ELF_TARG_CLASS ELFCLASS32
|
||||
#if define(__LITTLE_ENDIAN__)
|
||||
#if defined(__LITTLE_ENDIAN__)
|
||||
#define ELF_TARG_DATA ELFDATA2LSB
|
||||
#elif defined(__BIG_ENDIAN__)
|
||||
#define ELF_TARG_DATA ELFDATA2LMSB
|
||||
|
@@ -57,6 +57,9 @@ static char sccsid[] = "@(#)nlist.c 8.1 (Berkeley) 6/4/93";
|
||||
|
||||
#ifdef _NLIST_DO_AOUT
|
||||
static int __aout_fdnlist(int, struct nlist *);
|
||||
#ifndef N_SYMSIZE
|
||||
#define N_SYMSIZE(a) ((a).a_syms)
|
||||
#endif
|
||||
#endif
|
||||
#ifdef _NLIST_DO_ELF
|
||||
static int __elf_fdnlist(int, struct nlist *);
|
||||
|
Reference in New Issue
Block a user