# Copyright (C) 2016, 2017, 2018, 2019  Stefan Vargyas
# 
# This file is part of Json-Type.
# 
# Json-Type is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# 
# Json-Type is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with Json-Type.  If not, see <http://www.gnu.org/licenses/>.

PROGRAM := json
LIBRARY := json.so

LIB_HOME := ../lib

GCC_STD := gnu99
CFLAGS := -Wall -Wextra \
          -std=${GCC_STD} -g -I.. -I. \
          -DPROGRAM=${PROGRAM} \
          -DLIBRARY=${LIBRARY}
LDFLAGS := -fdata-sections \
           -ffunction-sections \
           -Wl,--gc-sections \
           -Wl,-L=${LIB_HOME} \
           -Wl,-rpath=. \
           -Wl,-rpath-link=${LIB_HOME} \
           -l:${LIBRARY} \
           -fPIC

SRCS := $(wildcard *.c)
OBJS := $(patsubst %.c,%.o, ${SRCS})
BIN  := ${PROGRAM}

include common.mk


