Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==================================
- # Makefile for building: libsopp.a
- #==================================
- # Definitions
- #------------
- # C compiler
- CC = gcc
- # C++ compiler
- CXX = g++
- # Include file directory
- INC_DIR = ./include
- # Object file directory
- OBJ_DIR = ./obj
- # Macros
- #-------
- # Tests for the obj directory
- TEST_OBJ = test -d obj
- # Makes the obj directory
- MAKE_OBJ = mkdir obj
- # Removes the obj directory
- REM_OBJ = rm -r obj
- all: object_directory json_reader.o json_writer.o json_value.o
- ar -r libjsoncpp.a obj/json_reader.o obj/json_writer.o obj/json_value.o
- json_reader.o: src/lib_json/json_reader.cpp
- $(CXX) -I $(INC_DIR) -c -o obj/json_reader.o src/lib_json/json_reader.cpp
- json_writer.o: src/lib_json/json_writer.cpp
- $(CXX) -I $(INC_DIR) -c -o obj/json_writer.o src/lib_json/json_writer.cpp
- json_value.o: src/lib_json/json_value.cpp
- $(CXX) -I $(INC_DIR) -c -o obj/json_value.o src/lib_json/json_value.cpp
- object_directory:
- $(TEST_OBJ) || $(MAKE_OBJ)
- install:
- sudo cp -r include/json --target-directory=/usr/include
- cp libjsoncpp.a /usr/lib/libjsoncpp.a
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement