Skip to content

Commit 8df8b31

Browse files
committed
Finished build config
1 parent c005720 commit 8df8b31

File tree

8 files changed

+69
-4
lines changed

8 files changed

+69
-4
lines changed

.gitignore

+35
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,38 @@
3030
*.exe
3131
*.out
3232
*.app
33+
34+
# Autotools
35+
# http://www.gnu.org/software/automake
36+
37+
Makefile.in
38+
/ar-lib
39+
/mdate-sh
40+
/py-compile
41+
/test-driver
42+
/ylwrap
43+
44+
# http://www.gnu.org/software/autoconf
45+
46+
/autom4te.cache
47+
/autoscan.log
48+
/autoscan-*.log
49+
/aclocal.m4
50+
/compile
51+
/config.guess
52+
/config.h.in
53+
/config.sub
54+
/configure
55+
/configure.scan
56+
/depcomp
57+
/install-sh
58+
/missing
59+
/stamp-h1
60+
61+
# https://www.gnu.org/software/libtool/
62+
63+
/ltmain.sh
64+
65+
# http://www.gnu.org/software/texinfo
66+
67+
/texinfo.tex

ChangeLog

Whitespace-only changes.

Makefile.am

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
ACLOCAL_AMFLAGS = -I m4
2+
3+
libbyteconvert_subdirs=libbyteconvert
4+
5+
SUBDIRS=libbyteconvert

README.md

+11
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@ Have you ever wanted to transmit `int`,`short`,`long`,`double` or any other nume
88
## What you need to consider, when you are using this library
99
When you are using this library, you need to consider variable byte size, because if you are using different platforms, then there may be some errors, because int on platform 1 has 4 bytes and int on platform 2 may has 2 bytes.
1010

11+
## How to install
12+
```
13+
$ cd <library_directory>
14+
$ autoreconf -vis
15+
$ ./configure
16+
$ make
17+
$ make install
18+
```
19+
20+
If you have problems, that library can't be found run `sudo ldconfig`.
21+
1122
## Examples
1223
Convert numeric variable for eg. `int`,`short`,`float`,`double` to array of bytes.
1324
``` c++

configure.ac

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
AC_INIT([libbyteconvert], [0.1.0], [[email protected]])
22

3-
AM_INIT_AUTOMAKE
3+
AC_CONFIG_MACRO_DIR([m4])
4+
5+
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
6+
LT_INIT
47

58
# Checks for programs.
69
AC_PROG_CXX
@@ -15,9 +18,10 @@ AC_TYPE_SIZE_T
1518
AC_TYPE_UINT8_T
1619

1720
# Checks for library functions.
18-
21+
AC_FUNC_MALLOC
1922

2023
# Config files
21-
AC_CONFIG_FILES([Makefile])
24+
AC_CONFIG_FILES([Makefile
25+
libbyteconvert/Makefile])
2226

2327
AC_OUTPUT

examples/SimpleTest.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include <iostream>
22
#include <cstdlib>
3-
#include "../libbyteconvert/ByteConvert.hpp"
3+
#include <ByteConvert.hpp>
44

55
using namespace std;
66

libbyteconvert/Makefile.am

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
AM_CXXFLAGS = -std=c++11
2+
lib_LTLIBRARIES = libbyteconvert.la
3+
libbyteconvert_la_SOURCES = ByteConvert.cpp
4+
libbyteconvert_la_HEADERS = ByteConvert.hpp
5+
libbyteconvert_ladir = $(includedir)

m4/.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
# Ignore everything in this directory
3+
*
4+
# Except this file
5+
!.gitignore

0 commit comments

Comments
 (0)