Remove tomlc99's original Makefile because we don't use it

This commit is contained in:
Koichiro IWAO 2023-04-03 16:54:37 +09:00
parent 576feffe90
commit 7ca834e3b8
1 changed files with 0 additions and 50 deletions

View File

@ -1,50 +0,0 @@
prefix ?= /usr/local
HFILES = toml.h
CFILES = toml.c
OBJ = $(CFILES:.c=.o)
EXEC = toml_json toml_cat toml_sample
PCFILE = libtoml.pc
CFLAGS = -std=c99 -Wall -Wextra -fpic
LIB_VERSION = 1.0
LIB = libtoml.a
LIB_SHARED = libtoml.so.$(LIB_VERSION)
# to compile for debug: make DEBUG=1
# to compile for no debug: make
ifdef DEBUG
CFLAGS += -O0 -g
else
CFLAGS += -O2 -DNDEBUG
endif
all: $(LIB) $(LIB_SHARED) $(EXEC)
*.o: $(HFILES)
libtoml.a: toml.o
ar -rcs $@ $^
libtoml.so.$(LIB_VERSION): toml.o
$(CC) -shared -o $@ $^
$(EXEC): $(LIB)
install: all
install -d ${prefix}/include ${prefix}/lib
install toml.h ${prefix}/include
install $(LIB) ${prefix}/lib
install $(LIB_SHARED) ${prefix}/lib
ifeq "$(prefix)" "/usr/local"
install $(PCFILE) /usr/local/lib/pkgconfig
endif
clean:
rm -f *.o $(EXEC) $(LIB) $(LIB_SHARED)
format:
clang-format -i $(shell find . -name '*.[ch]')
.PHONY: all clean install format