Makefile: ability to compile thirdparty libraries (for linux packages)
parent
8cd1f962d3
commit
7bbaf432e6
12
Makefile
12
Makefile
|
@ -1,8 +1,11 @@
|
||||||
|
CC ?= cc
|
||||||
|
CFLAGS ?= -fPIC -O2
|
||||||
|
|
||||||
all: clean v
|
all: clean v
|
||||||
$(info V has been successfully built)
|
$(info V has been successfully built)
|
||||||
|
|
||||||
v: v.c
|
v: v.c
|
||||||
cc -std=gnu11 -w -o v v.c -lm
|
${CC} -std=gnu11 -w -o v v.c -lm
|
||||||
./v -o v compiler
|
./v -o v compiler
|
||||||
rm v.c
|
rm v.c
|
||||||
|
|
||||||
|
@ -17,4 +20,9 @@ test: v
|
||||||
find examples -name '*.v' -not -path "examples/hot_code_reloading/*" -print0 | xargs -0 -n1 ./v
|
find examples -name '*.v' -not -path "examples/hot_code_reloading/*" -print0 | xargs -0 -n1 ./v
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-rm -f v.c v vprod
|
-rm -f v.c .v.c v vprod thirdparty/**/*.o
|
||||||
|
|
||||||
|
SOURCES = $(wildcard thirdparty/**/*.c)
|
||||||
|
OBJECTS := ${SOURCES:.c=.o}
|
||||||
|
|
||||||
|
thirdparty: ${OBJECTS}
|
||||||
|
|
Loading…
Reference in New Issue