From c7312d9d1c476a3dad3d1a895d83b261f8754202 Mon Sep 17 00:00:00 2001 From: Zaoqi Date: Tue, 6 Aug 2019 22:15:05 +0800 Subject: [PATCH] Update Makefile --- Makefile | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 7af8a0d52c..4ba4044d59 100644 --- a/Makefile +++ b/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)