picrin/lib/Makefile

54 lines
799 B
Makefile
Raw Normal View History

2017-04-14 10:58:02 -04:00
LIBPICRIN_SRCS = \
blob.c\
bool.c\
char.c\
cont.c\
data.c\
debug.c\
dict.c\
error.c\
gc.c\
load.c\
number.c\
pair.c\
port.c\
proc.c\
record.c\
state.c\
string.c\
symbol.c\
var.c\
vector.c\
weak.c\
ext/eval.c\
ext/read.c\
ext/write.c\
ext/file.c
LIBPICRIN_OBJS = \
$(LIBPICRIN_SRCS:.c=.o)
LIBPICRIN_HEADERS = \
include/picrin.h\
include/picconf.h\
include/picrin/extra.h\
include/picrin/setup.h\
include/picrin/value.h\
khash.h\
object.h\
state.h
2017-04-14 11:23:13 -04:00
CFLAGS += -I./include -Wall -Wextra -g
2017-04-14 10:58:02 -04:00
2017-04-15 02:45:28 -04:00
mini-picrin: ext/main.o libpicrin.a
$(CC) $(CFLAGS) -o $@ ext/main.o libpicrin.a
2017-04-14 10:58:02 -04:00
2017-04-15 02:45:28 -04:00
libpicrin.a: $(LIBPICRIN_OBJS)
$(AR) $(ARFLAGS) $@ $(LIBPICRIN_OBJS)
2017-04-14 12:33:18 -04:00
2017-04-14 10:58:02 -04:00
$(LIBPICRIN_OBJS): $(LIBPICRIN_HEADERS)
clean:
2017-04-15 02:45:28 -04:00
$(RM) $(LIBPICRIN_OBJS) ext/main.o mini-picrin libpicrin.a
2017-04-14 10:58:02 -04:00
.PHONY: clean