mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
Update Makefile
This commit is contained in:
parent
52f473d1c7
commit
c7312d9d1c
17
Makefile
17
Makefile
@ -1,20 +1,23 @@
|
||||
CC ?= cc
|
||||
CFLAGS ?= -O2 -fPIC
|
||||
PREFIX ?= /usr/local
|
||||
VC ?= 0.1.17
|
||||
|
||||
all: clean v
|
||||
all: v
|
||||
$(info V has been successfully built)
|
||||
|
||||
v: v.c
|
||||
./v -o v compiler
|
||||
v: v.c.out
|
||||
./v.c.out -o v compiler
|
||||
|
||||
v-release: v.c
|
||||
./v -cflags '${CFLAGS}' -o v compiler
|
||||
strip v
|
||||
|
||||
v.c:
|
||||
curl -Os https://raw.githubusercontent.com/vlang/vc/master/v.c
|
||||
${CC} -std=gnu11 -w -o v v.c -lm
|
||||
v.c.out: v.${VC}.c
|
||||
${CC} -std=gnu11 -w -o v.c.out v.${VC}.c -lm
|
||||
|
||||
v.${VC}.c:
|
||||
curl -o v.${VC}.c -Ls https://github.com/vlang/vc/raw/${VC}/v.c
|
||||
|
||||
test: v
|
||||
./v -prod -o vprod compiler # Test prod build
|
||||
@ -24,7 +27,7 @@ test: v
|
||||
find examples -name '*.v' -print0 | xargs -0 -n1 ./v
|
||||
|
||||
clean:
|
||||
-rm -f v.c .v.c v vprod thirdparty/**/*.o
|
||||
-rm -f v.c v*.c v.c.out v vprod thirdparty/**/*.o
|
||||
find . -name '.*.c' -print0 | xargs -0 -n1 rm -f
|
||||
|
||||
SOURCES = $(wildcard thirdparty/**/*.c)
|
||||
|
Loading…
Reference in New Issue
Block a user