From 41c3b72955d2d0b194b31d85b26210edf50689f2 Mon Sep 17 00:00:00 2001 From: Thomas Touhey Date: Sun, 22 May 2016 23:21:53 +0200 Subject: [PATCH] Building is done in a correct way now :) --- CONTRIBUTING.md | 2 +- Makefile | 2 +- README.md | 13 +++++++------ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0012220..34e94a2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,4 +2,4 @@ libmonochrome is a finished project by PierrotLL, and has been adapted to be used as a static library. It aims a full compatibility with addins using the 2011 version, so modifying is not a good idea, and adding things to the source code may be inappropriate as it is a finished project. -However, if you want to contribute to everything around it (like packaging stuff), your help is welcome :) +However, if you want to contribute to everything around it (like building or packaging stuff), your help is welcome :) diff --git a/Makefile b/Makefile index 8b1bf1f..84875f2 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,6 @@ #******************************************************************************# # INCLUDE CONFIGURATION include $(CURDIR)/Makefile.vars -include $(CURDIR)/Makefile.cfg # DEDUCED VARIABLES ALLOBJ = $(SRC:%=$(OBJDIR)/%.o) @@ -51,6 +50,7 @@ re: fclean all ## Install project install: + include $(CURDIR)/Makefile.cfg $(INST) -D -m 644 lib$(NAME).a $(ILIBDIR)/lib$(NAME).a $(foreach inc, $(INCPUB), \ $(INST) -D -m 644 $(INCDIR)/$(inc).h $(IINCDIR)/$(inc).h$(\n)) diff --git a/README.md b/README.md index 6c6a745..94eedb0 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,13 @@ The original docs have been converted to markdown and are available [in the libm ## Building -Building the library is achieved by the Makefile : -- `make`: make the library ; +First, create the Makefile configuration with the `./configure` command. Defaults settings should be enough, but if you want to change the installation directories, see `./configure --help`. + +To build the library, simply `make`. + +To install the built library, use `make install` (it will use the configuration generated by `./configure`). + +If you want to contribute, these Makefile targets might help you : - `make clean`: clean the object files ; - `make fclean`: clean the object files and the final library ; - `make re`: cleans the object files and the final library, then makes the project. @@ -15,7 +20,3 @@ Building the library is achieved by the Makefile : ## Using Once installed, when linking a project, you will need to link with the library by adding the `-lmonochrome` flag. - -If you don't want to install the library : -- when compiling, you should add `-I path/to/this/dir/include`. -- when linking, you should add `-L path/to/this/dir`.