2019-07-17 21:11:53 +03:00
|
|
|
CC ?= cc
|
2021-09-28 11:38:33 +03:00
|
|
|
VFLAGS ?=
|
2022-03-08 15:48:20 +03:00
|
|
|
CFLAGS ?=
|
|
|
|
LDFLAGS ?=
|
2019-07-17 21:11:53 +03:00
|
|
|
|
2022-12-14 15:05:10 +03:00
|
|
|
.PHONY: all check download_vc v
|
2022-05-01 13:38:30 +03:00
|
|
|
|
2022-12-14 15:05:10 +03:00
|
|
|
all: download_vc v
|
|
|
|
|
|
|
|
download_vc:
|
|
|
|
if [ -f vc/v.c ] ; then git -C vc/ pull; else git clone --filter=blob:none https://github.com/vlang/vc vc/; fi
|
|
|
|
|
|
|
|
v:
|
2022-04-21 00:12:50 +03:00
|
|
|
$(CC) $(CFLAGS) -std=gnu11 -w -o v1 vc/v.c -lm -lexecinfo -lpthread $(LDFLAGS)
|
2021-09-28 11:38:33 +03:00
|
|
|
./v1 -no-parallel -o v2 $(VFLAGS) cmd/v
|
|
|
|
./v2 -o v $(VFLAGS) cmd/v
|
2022-12-14 15:05:10 +03:00
|
|
|
rm -rf v1 v2
|
2019-08-16 09:25:10 +03:00
|
|
|
@echo "V has been successfully built"
|
2022-01-18 18:25:11 +03:00
|
|
|
./v run ./cmd/tools/detect_tcc.v
|
2022-05-01 13:38:30 +03:00
|
|
|
|
|
|
|
check:
|
|
|
|
./v test-all
|