init
This commit is contained in:
commit
32ef62bd20
11 changed files with 2354 additions and 0 deletions
28
Makefile
Normal file
28
Makefile
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
CC = gcc
|
||||
CFLAGS = -I include -fPIC
|
||||
LDFLAGS = -shared
|
||||
LIBS =
|
||||
|
||||
OBJS = src/core.o src/file.o src/unicode.o src/stb_ds.o
|
||||
|
||||
SO = .so
|
||||
|
||||
.PHONY: all format clean
|
||||
.SUFFIXES: .c .o
|
||||
|
||||
all: libxmllib$(SO)
|
||||
|
||||
format:
|
||||
clang-format --verbose -i `find src include -name "*.c" -or -name "*.h"`
|
||||
|
||||
example: example.c libxmllib$(SO)
|
||||
$(CC) -o $@ example.c -I include -Wl,-R. -L. -lxmllib
|
||||
|
||||
libxmllib$(SO): $(OBJS)
|
||||
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -f src/*.o *.so *.dll
|
||||
Loading…
Add table
Add a link
Reference in a new issue