29 lines
404 B
Makefile
29 lines
404 B
Makefile
CC = gcc
|
|
CFILES = toml.c
|
|
|
|
CFLAGS = -std=c99 -Wall -Wextra
|
|
CFLAGS += -O2 -DNDEBUG
|
|
#CFLAGS += -O0 -g
|
|
|
|
EXEC = toml_json
|
|
|
|
LIB = libtoml.a
|
|
|
|
all: $(LIB) $(EXEC)
|
|
|
|
|
|
libtoml.a: toml.o
|
|
ar -rcs $@ $^
|
|
|
|
toml_json: toml_json.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)
|