From 810e85541c64053c379d1a40f331d8bfd38780c8 Mon Sep 17 00:00:00 2001 From: whoami Date: Wed, 17 Jul 2019 22:50:38 +0300 Subject: [PATCH] Makefile: update --- Makefile | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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