mirror of
https://github.com/darlinghq/darling-bc.git
synced 2025-02-20 18:50:45 +00:00
Get bc and dc to build
This commit is contained in:
parent
43970f2f7a
commit
c66d05f135
68
CMakeLists.txt
Normal file
68
CMakeLists.txt
Normal file
@ -0,0 +1,68 @@
|
||||
project(bc)
|
||||
|
||||
cmake_minimum_required(VERSION 2.4.0)
|
||||
|
||||
# Automatically escape macros
|
||||
cmake_policy(SET CMP0005 NEW)
|
||||
|
||||
include(darling_exe)
|
||||
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/dc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/h
|
||||
${DARLING_TOP_DIRECTORY}/src/libc/include/FreeBSD
|
||||
${DARLING_TOP_DIRECTORY}/src/libc/gen
|
||||
)
|
||||
|
||||
add_definitions(
|
||||
-DHAVE_CONFIG_H
|
||||
)
|
||||
|
||||
# Hide warnings
|
||||
add_definitions(
|
||||
-Wno-pointer-sign
|
||||
-Wno-implicit-function-declaration
|
||||
)
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -nostdinc -fwrapv -fPIC -funsigned-char")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "-nodefaultlibs -nostdlib -fPIC -Wl,--version-script=${DARLING_TOP_DIRECTORY}/darwin.map")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-nodefaultlibs -nostdlib -fPIC -Wl,--version-script=${DARLING_TOP_DIRECTORY}/darwin.map")
|
||||
|
||||
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/darling")
|
||||
SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
|
||||
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
|
||||
add_library(bcstatic STATIC
|
||||
lib/getopt.c
|
||||
lib/getopt1.c
|
||||
lib/number.c
|
||||
lib/vfprintf.c
|
||||
)
|
||||
|
||||
add_darling_executable(bc
|
||||
bc/main.c
|
||||
bc/bc.c
|
||||
bc/scan.c
|
||||
bc/execute.c
|
||||
bc/load.c
|
||||
bc/storage.c
|
||||
bc/util.c
|
||||
bc/global.c
|
||||
)
|
||||
target_link_libraries(bc bcstatic)
|
||||
|
||||
add_darling_executable(dc
|
||||
dc/dc.c
|
||||
dc/misc.c
|
||||
dc/eval.c
|
||||
dc/stack.c
|
||||
dc/array.c
|
||||
dc/numeric.c
|
||||
dc/string.c
|
||||
)
|
||||
target_link_libraries(dc bcstatic)
|
||||
|
||||
install(TARGETS bc dc DESTINATION libexec/darling/usr/bin)
|
||||
|
||||
install(FILES doc/bc.1 doc/dc.1 DESTINATION libexec/darling/usr/share/man/man1)
|
82
h/config.h
Normal file
82
h/config.h
Normal file
@ -0,0 +1,82 @@
|
||||
/* config.h. Generated automatically by configure. */
|
||||
/* config.h.in. Generated automatically from configure.in by autoheader. */
|
||||
|
||||
/* Define to empty if the keyword does not work. */
|
||||
/* #undef const */
|
||||
|
||||
/* Define if you don't have vprintf but do have _doprnt. */
|
||||
/* #undef HAVE_DOPRNT */
|
||||
|
||||
/* Define if you have the vprintf function. */
|
||||
#define HAVE_VPRINTF 1
|
||||
|
||||
/* Define if on MINIX. */
|
||||
/* #undef _MINIX */
|
||||
|
||||
/* Define if the system does not provide POSIX.1 features except
|
||||
with this defined. */
|
||||
/* #undef _POSIX_1_SOURCE */
|
||||
|
||||
/* Define if you need to in order for stat and other things to work. */
|
||||
/* #undef _POSIX_SOURCE */
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
||||
/* #undef size_t */
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define if lex declares yytext as a char * by default, not a char[]. */
|
||||
/* #undef YYTEXT_POINTER */
|
||||
|
||||
/* VERSION number for DC target*/
|
||||
#define DC_VERSION "1.3"
|
||||
|
||||
/* COPYRIGHT notice for DC target */
|
||||
#define DC_COPYRIGHT "Copyright 1994, 1997, 1998, 2000 Free Software Foundation, Inc."
|
||||
|
||||
/* COPYRIGHT notice for BC target */
|
||||
#define BC_COPYRIGHT "Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc."
|
||||
|
||||
/* Define to use the readline library. */
|
||||
/* #undef READLINE */
|
||||
|
||||
/* Define to use the BSD libedit library. */
|
||||
/* #undef LIBEDIT */
|
||||
|
||||
/* Define to `size_t' if <sys/types.h> and <stddef.h> don't define. */
|
||||
/* #undef ptrdiff_t */
|
||||
|
||||
/* Define if you have the isgraph function. */
|
||||
#define HAVE_ISGRAPH 1
|
||||
|
||||
/* Define if you have the setvbuf function. */
|
||||
#define HAVE_SETVBUF 1
|
||||
|
||||
/* Define if you have the <lib.h> header file. */
|
||||
/* #undef HAVE_LIB_H */
|
||||
|
||||
/* Define if you have the <limits.h> header file. */
|
||||
#define HAVE_LIMITS_H 1
|
||||
|
||||
/* Define if you have the <stdarg.h> header file. */
|
||||
#define HAVE_STDARG_H 1
|
||||
|
||||
/* Define if you have the <stddef.h> header file. */
|
||||
#define HAVE_STDDEF_H 1
|
||||
|
||||
/* Define if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE "bc"
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "1.06"
|
||||
|
Loading…
x
Reference in New Issue
Block a user