Mercurial > pub > dyncall > dyncall
comparison doc/README.embedded @ 0:3e629dc19168
initial from svn dyncall-1745
author | Daniel Adler |
---|---|
date | Thu, 19 Mar 2015 22:24:28 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:3e629dc19168 |
---|---|
1 Makefile.embedded - hybrid DynCall makefiles for GNU, BSD and SUN make | |
2 ====================================================================== | |
3 | |
4 | |
5 Brief overview | |
6 -------------- | |
7 This is one of the latest build systems designed for DynCall. | |
8 It was designed for being embeddable in bigger 'make' based systems. | |
9 It uses a very simple structure and it does not require any 'configure' phase. | |
10 Instead the user can specify the CFLAGS and LDFLAGS by himself. | |
11 For a couple of platforms, the make system supports phony targets of popular | |
12 operating-systems such as 'bsd'. | |
13 | |
14 Building the library: | |
15 --------------------- | |
16 $ make -f Makefile.embedded <variant> | |
17 | |
18 Building the tests: | |
19 ------------------- | |
20 $ cd test ; make -f Makefile.embedded <variant> | |
21 | |
22 Installation: | |
23 ------------- | |
24 $ make -f Makefile.embedded PREFIX=/usr/local install | |
25 | |
26 Installation with support for DESTDIR: | |
27 -------------------------------------- | |
28 $ make -f Makefile.embedded DESTDIR=/tmp/staging PREFIX=/usr/local install | |
29 | |
30 | |
31 Available variants: | |
32 ------------------- | |
33 bsd Free/Net/Open/DragonFly/Mir BSD | |
34 linux Linux | |
35 osx Mac OS X | |
36 osx-universal Mac OS X universal binaries (i386,x86_64 and ppc) | |
37 sun SunOS and Sun Pro compiler | |
38 sun-64bit SunOS and Sun Pro compiler for sparc64(? amd64) | |
39 sun-gcc SunOS and GCC compiler | |
40 sun-gcc-64bit SunOS and GCC compiler for sparc64 (? amd64) | |
41 ios61 iOS SDK 6.1 armv7 (untested!) | |
42 ios61-nothumb iOS SDK 6.1 armv7 -mno-thumb (untested!) | |
43 | |
44 Tweaking the build: | |
45 ------------------- | |
46 $ VAR1=<VALUE1> VAR2=<VALUE2> .. make -f Makefile.embedded <variant> | |
47 | |
48 Adding a variant | |
49 ----------------- | |
50 Currently we deal with two files to specify a custom target. | |
51 | |
52 The top-level Makefile.embedded controls for building the libraries. | |
53 Useful variables are AR, CC, CFLAGS and ASFLAGS. | |
54 | |
55 The test/Makefile.embedded file controls for building the tests. | |
56 The tests currently involve sometimes C++ and some platforms need | |
57 to link with the math library. Others need the dynamic linker. | |
58 Useful variables are CXX, CC, CCC (Sun), CFLAGS, CCFLAGS (Sun), | |
59 CXXFLAGS andLDFLAGS. | |
60 | |
61 Background | |
62 ---------- | |
63 During the preparation for the public release of the R package 'rdyncall' I was | |
64 looking for a way to get DynCall integrated into an existing Make system such | |
65 as offered by R for build R packages. | |
66 | |
67 It was inspired by the make files of Lua which are damn simple and | |
68 don't need a configure but a user that knows the target platform name. | |
69 | |
70 The source package can be configured automatically during compilation and | |
71 does not require explicit configuration anymore using "*.S" files that | |
72 are Assembly files which are preprocessed by the C Preprocessor. | |
73 | |
74 This feature is available by GCC and SunPro compilers. | |
75 | |
76 Limitations | |
77 ----------- | |
78 | |
79 Mac OS X universal static libraries require to use | |
80 | |
81 'libtool -static -o libname.a obj1.o obj2.o ...' instead of 'ar cru libname.a obj1.o obj2.o'. | |
82 We use predefined variables AR and ARFLAGS. | |
83 The variant osx-universal uses AR=libtool. | |
84 |