diff --git a/Makefile b/Makefile index 702908c74d..0626f8e6cf 100644 --- a/Makefile +++ b/Makefile @@ -5,12 +5,14 @@ all: clean v $(info V has been successfully built) v: v.c - ${CC} -std=gnu11 -w -o v v.c -lm ./v -o v compiler - rm v.c + +v-release: v.c + ./v -prod -o v compiler v.c: curl -Os https://raw.githubusercontent.com/vlang/vc/master/v.c + ${CC} -std=gnu11 -w -o v v.c -lm test: v ./v -prod -o vprod compiler # Test prod build @@ -26,3 +28,11 @@ SOURCES = $(wildcard thirdparty/**/*.c) OBJECTS := ${SOURCES:.c=.o} thirdparty: ${OBJECTS} + +thirdparty-release: ${OBJECTS} + strip ${OBJECTS} + +debug: clean v thirdparty + +release: CFLAGS += -pie +release: clean v-release thirdparty-release