mirror of
https://gitlab.freedesktop.org/libbsd/libbsd.git
synced 2025-01-24 10:59:29 +01:00
build: Refactor COMPILER and LINK commands into new variables
This commit is contained in:
parent
1f0b0b23cd
commit
08afd5d4c9
9
Makefile
9
Makefile
@ -108,6 +108,9 @@ 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
|
||||||
|
|
||||||
|
COMPILE = $(CC) $(MK_CFLAGS) $(CFLAGS)
|
||||||
|
LINK = $(CCLD)
|
||||||
|
|
||||||
prefix = /usr
|
prefix = /usr
|
||||||
exec_prefix =
|
exec_prefix =
|
||||||
libdir = ${exec_prefix}/lib
|
libdir = ${exec_prefix}/lib
|
||||||
@ -123,10 +126,10 @@ libs: $(LIB_STATIC) $(LIB_SHARED_SO) $(LIB_PKGCONFIG)
|
|||||||
man: $(LIB_MANS)
|
man: $(LIB_MANS)
|
||||||
|
|
||||||
%.lo: %.c
|
%.lo: %.c
|
||||||
$(CC) -o $@ $(MK_CFLAGS) $(CFLAGS) -DPIC -fPIC -c $<
|
$(COMPILE) -o $@ -DPIC -fPIC -c $<
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
$(CC) -o $@ $(MK_CFLAGS) $(CFLAGS) -c $<
|
$(COMPILE) -o $@ -c $<
|
||||||
|
|
||||||
src/md5.3bsd: src/mdX.3
|
src/md5.3bsd: src/mdX.3
|
||||||
sed -e 's/mdX/md5/g' -e 's/mdY/md4/g' -e 's/MDX/MD5/g' $< > $@
|
sed -e 's/mdX/md5/g' -e 's/mdY/md4/g' -e 's/MDX/MD5/g' $< > $@
|
||||||
@ -152,7 +155,7 @@ $(LIB_SONAME): $(LIB_SHARED)
|
|||||||
ln -fs $^ $@
|
ln -fs $^ $@
|
||||||
|
|
||||||
$(LIB_SHARED): $(LIB_SHARED_OBJS)
|
$(LIB_SHARED): $(LIB_SHARED_OBJS)
|
||||||
$(CCLD) \
|
$(LINK) \
|
||||||
-shared \
|
-shared \
|
||||||
-Wl,-soname -Wl,$(LIB_SONAME) \
|
-Wl,-soname -Wl,$(LIB_SONAME) \
|
||||||
-Wl,--version-script=Versions \
|
-Wl,--version-script=Versions \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user