mirror of
https://github.com/vale981/libblobpack
synced 2025-03-05 18:01:41 -05:00
22 lines
453 B
Makefile
22 lines
453 B
Makefile
all: libblob.a libblob.so simple-example
|
|
|
|
SOURCE:=$(wildcard *.c)
|
|
HEADERS:=$(wildcard *.h)
|
|
OBJECTS:=$(patsubst %.c,%.o,$(SOURCE))
|
|
LDFLAGS+=-ljson-c
|
|
CFLAGS+=-g -std=gnu99 -fPIC
|
|
|
|
libblob.a: $(OBJECTS)
|
|
$(AR) rcs -o $@ $^
|
|
|
|
libblob.so: $(OBJECTS)
|
|
$(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^
|
|
|
|
%.o: %.c
|
|
$(CC) $(CFLAGS) -c -o $@ $^
|
|
|
|
simple-example: examples/simple.c libblob.a
|
|
$(CC) $(CFLAGS) -I. -o $@ $^ -L. -lblob -ljson-c
|
|
|
|
clean:
|
|
rm -f *.o *.a *.so
|