toml/Makefile
CK Tan a0b45225e2 Fixes as suggested by mytchel
1. A critical bug in toml_parse_file when the file is empty
2. Add toml_cat.c to makefile
3. Other misc fixes related to error handling
2017-08-07 14:47:59 -07:00

30 lines
442 B
Makefile

CC = gcc
CFILES = toml.c
CFLAGS = -std=c99 -Wall -Wextra
CFLAGS += -O2 -DNDEBUG
#CFLAGS += -O0 -g
EXEC = toml_json toml_cat
LIB = libtoml.a
all: $(LIB) $(EXEC)
libtoml.a: toml.o
ar -rcs $@ $^
toml_json: toml_json.c $(LIB)
toml_cat: toml_cat.c $(LIB)
prefix ?= /usr/local
install: all
install -d ${prefix}/include ${prefix}/lib
install toml.h ${prefix}/include
install libtoml.a ${prefix}/lib
clean:
rm -f *.o $(EXEC) $(LIB)