Skip to content

Commit

Permalink
ci: further makefile bootstrapping fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
spytheman committed Sep 28, 2021
1 parent 97eb0fc commit d31c925
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
15 changes: 9 additions & 6 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,16 @@ endif

all: latest_vc latest_tcc
ifdef WIN32
$(CC) $(CFLAGS) -std=c99 -municode -w -I ./thirdparty/stdatomic/nix -o $(V) $(VC)/$(VCFILE) $(LDFLAGS)
$(V) -o v2.exe $(VFLAGS) cmd/v
move /y v2.exe v.exe
$(CC) $(CFLAGS) -std=c99 -municode -w -I ./thirdparty/stdatomic/nix -o v1.exe $(VC)/$(VCFILE) $(LDFLAGS)
v1.exe -no-parallel -o v2.exe $(VFLAGS) cmd/v
v2.exe -o $(V) $(VFLAGS) cmd/v
del v1.exe
del v2.exe
else
$(CC) $(CFLAGS) -std=gnu99 -w -I ./thirdparty/stdatomic/nix -o $(V) $(VC)/$(VCFILE) -lm -lpthread $(LDFLAGS)
$(V) -o v2.exe $(VFLAGS) cmd/v
mv -f v2.exe v
$(CC) $(CFLAGS) -std=gnu99 -w -I ./thirdparty/stdatomic/nix -o v1.exe $(VC)/$(VCFILE) -lm -lpthread $(LDFLAGS)
./v1.exe -no-parallel -o v2.exe $(VFLAGS) cmd/v
./v2.exe -o $(V) $(VFLAGS) cmd/v
rm -rf v1.exe v2.exe
endif
@echo "V has been successfully built"
@$(V) -version
Expand Down
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
CC ?= cc
VFLAGS ?=

all:
rm -rf vc/
git clone --depth 1 --quiet https://github.com/vlang/vc
$(CC) -std=gnu11 -w -I ./thirdparty/stdatomic/nix -o v vc/v.c -lm -lexecinfo
rm -rf vc/
$(CC) -std=gnu11 -w -I ./thirdparty/stdatomic/nix -o v1 vc/v.c -lm -lexecinfo
./v1 -no-parallel -o v2 $(VFLAGS) cmd/v
./v2 -o v $(VFLAGS) cmd/v
rm -rf v1 v2 vc/
@echo "V has been successfully built"

0 comments on commit d31c925

Please sign in to comment.