mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-18 21:27:56 +00:00
libports: MPC
This patch adds the 'MPC' library to the 'libports' repository. Fixes #263.
This commit is contained in:
parent
cdb1c6f203
commit
b8ee4bda81
1
.gitignore
vendored
1
.gitignore
vendored
@ -70,6 +70,7 @@
|
||||
/libports/include/zlib
|
||||
/libports/include/gmp/gmp-impl.h
|
||||
/libports/include/gmp/x86_32/gmp-mparam.h
|
||||
/libports/include/mpc/
|
||||
/libports/include/mpfr/
|
||||
/libports/src/lib/gmp/mpn/asm-defs.m4
|
||||
/libports/src/lib/ncurses/codes.c
|
||||
|
3
libports/lib/import/import-mpc.mk
Normal file
3
libports/lib/import/import-mpc.mk
Normal file
@ -0,0 +1,3 @@
|
||||
MPC = mpc-0.9
|
||||
|
||||
REP_INC_DIR += include/mpc
|
15
libports/lib/mk/mpc.mk
Normal file
15
libports/lib/mk/mpc.mk
Normal file
@ -0,0 +1,15 @@
|
||||
include $(REP_DIR)/lib/import/import-mpc.mk
|
||||
|
||||
MPC_DIR = $(REP_DIR)/contrib/$(MPC)
|
||||
|
||||
ifeq ($(wildcard $(MPC_DIR)),)
|
||||
REQUIRES += prepare_mpc
|
||||
endif
|
||||
|
||||
LIBS = libc gmp mpfr
|
||||
|
||||
SRC_C := $(notdir $(wildcard $(MPC_DIR)/src/*.c))
|
||||
|
||||
vpath %.c $(MPC_DIR)/src
|
||||
|
||||
SHARED_LIB = 1
|
32
libports/ports/mpc.mk
Normal file
32
libports/ports/mpc.mk
Normal file
@ -0,0 +1,32 @@
|
||||
include lib/import/import-mpc.mk
|
||||
|
||||
MPC_TGZ = $(MPC).tar.gz
|
||||
MPC_URL = http://www.multiprecision.org/mpc/download/$(MPC_TGZ)
|
||||
|
||||
#
|
||||
# Interface to top-level prepare Makefile
|
||||
#
|
||||
PORTS += $(MPC)
|
||||
|
||||
MPC_INCLUDES = include/mpc/mpc.h
|
||||
|
||||
prepare-mpc: $(CONTRIB_DIR)/$(MPC) $(MPC_INCLUDES)
|
||||
|
||||
$(CONTRIB_DIR)/$(MPC): clean-mpc
|
||||
|
||||
#
|
||||
# Port-specific local rules
|
||||
#
|
||||
$(DOWNLOAD_DIR)/$(MPC_TGZ):
|
||||
$(VERBOSE)wget -c -P $(DOWNLOAD_DIR) $(MPC_URL) && touch $@
|
||||
|
||||
$(CONTRIB_DIR)/$(MPC): $(DOWNLOAD_DIR)/$(MPC_TGZ)
|
||||
$(VERBOSE)tar xfz $< -C $(CONTRIB_DIR) && touch $@
|
||||
|
||||
include/mpc/mpc.h:
|
||||
$(VERBOSE)mkdir -p $(dir $@)
|
||||
$(VERBOSE)ln -sf ../../$(CONTRIB_DIR)/$(MPC)/src/mpc.h $@
|
||||
|
||||
clean-mpc:
|
||||
$(VERBOSE)rm -f $(MPC_INCLUDES)
|
||||
$(VERBOSE)rm -rf $(CONTRIB_DIR)/$(MPC)
|
Loading…
Reference in New Issue
Block a user