mirror of
https://github.com/vale981/libblobpack
synced 2025-03-04 09:21:42 -05:00
add Makefile
This commit is contained in:
parent
e032aeef96
commit
24b88b8a72
2 changed files with 19 additions and 6 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -1,10 +1,4 @@
|
|||
Makefile
|
||||
CMakeCache.txt
|
||||
CMakeFiles
|
||||
*.cmake
|
||||
*.a
|
||||
*.so
|
||||
*.dylib
|
||||
install_manifest.txt
|
||||
jshn
|
||||
*-example
|
||||
|
|
19
Makefile
Normal file
19
Makefile
Normal file
|
@ -0,0 +1,19 @@
|
|||
all: libblob.a libblob.so
|
||||
|
||||
SOURCE:=$(wildcard *.c)
|
||||
HEADERS:=$(wildcard *.h)
|
||||
OBJECTS:=$(patsubst %.c,%.o,$(SOURCE))
|
||||
LDFLAGS+=-ljson-c
|
||||
CFLAGS+=-fPIC
|
||||
|
||||
libblob.a: $(OBJECTS)
|
||||
$(AR) rcs -o $@ $^
|
||||
|
||||
libblob.so: $(OBJECTS)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -c -o $@ $^
|
||||
|
||||
clean:
|
||||
rm -f *.o
|
Loading…
Add table
Reference in a new issue