gitlab.com/CoiaPrant/sqlite3@v1.19.1/vfs/Makefile (about)

     1  # Copyright 2022 The CC Authors. All rights reserved.
     2  # Use of this source code is governed by a BSD-style
     3  # license that can be found in the LICENSE file.
     4  
     5  .PHONY: build_all_targetsclean edit editor tmp x
     6  
     7  build_all_targets:
     8  	GOOS=darwin GOARCH=amd64 go build -v ./...
     9  	GOOS=darwin GOARCH=amd64 go test -c -o /dev/null
    10  	GOOS=darwin GOARCH=arm64 go build -v ./...
    11  	GOOS=darwin GOARCH=arm64 go test -c -o /dev/null
    12  	GOOS=freebsd GOARCH=amd64 go build -v ./...
    13  	GOOS=freebsd GOARCH=amd64 go test -c -o /dev/null
    14  	GOOS=freebsd GOARCH=386 go build -v ./...
    15  	GOOS=freebsd GOARCH=386 go test -c -o /dev/null
    16  	GOOS=freebsd GOARCH=arm go build -v ./...
    17  	GOOS=freebsd GOARCH=arm go test -c -o /dev/null
    18  	GOOS=linux GOARCH=386 go build -v ./...
    19  	GOOS=linux GOARCH=386 go test -c -o /dev/null
    20  	GOOS=linux GOARCH=amd64 go build -v ./...
    21  	GOOS=linux GOARCH=amd64 go test -c -o /dev/null
    22  	GOOS=linux GOARCH=arm go build -v ./...
    23  	GOOS=linux GOARCH=arm go test -c -o /dev/null
    24  	GOOS=linux GOARCH=arm64 go build -v ./...
    25  	GOOS=linux GOARCH=arm64 go test -c -o /dev/null
    26  	GOOS=linux GOARCH=ppc64le go build -v ./...
    27  	GOOS=linux GOARCH=ppc64le go test -c -o /dev/null
    28  	GOOS=linux GOARCH=riscv64 go build -v ./...
    29  	GOOS=linux GOARCH=riscv64 go test -c -o /dev/null
    30  	GOOS=linux GOARCH=s390x go build -v ./...
    31  	GOOS=linux GOARCH=s390x go test -c -o /dev/null
    32  	GOOS=netbsd GOARCH=amd64 go build -v ./...
    33  	GOOS=netbsd GOARCH=amd64 go test -c -o /dev/null
    34  	GOOS=openbsd GOARCH=amd64 go build -v ./...
    35  	GOOS=openbsd GOARCH=amd64 go test -c -o /dev/null
    36  	GOOS=openbsd GOARCH=arm64 go build -v ./...
    37  	GOOS=openbsd GOARCH=arm64 go test -c -o /dev/null
    38  	# GOOS=windows GOARCH=386 go build -v ./...
    39  	# GOOS=windows GOARCH=386 go test -c -o /dev/null
    40  	GOOS=windows GOARCH=amd64 go build -v ./...
    41  	GOOS=windows GOARCH=amd64 go test -c -o /dev/null
    42  	GOOS=windows GOARCH=arm64 go build -v ./...
    43  	GOOS=windows GOARCH=arm64 go test -c -o /dev/null
    44  	echo done
    45  
    46  clean:
    47  	rm -f log-* cpu.test mem.test *.out
    48  	go clean
    49  
    50  edit:
    51  	@touch log
    52  	@if [ -f "Session.vim" ]; then gvim -S & else gvim -p Makefile *.c *.go & fi
    53  
    54  editor:
    55  	ccgo -o vfs_$(shell go env GOOS)_$(shell go env GOARCH).go c/vfs.c -I../testdata/sqlite-amalgamation-3390300 \
    56  		-lgitlab.com/CoiaPrant/sqlite3/lib -pkgname vfs -nocapi \
    57  		-export-externs X -D SQLITE_OS_UNIX \
    58  		-hide=vfsFullPathname \
    59  		-hide=vfsOpen \
    60  		-hide=vfsRead \
    61  		-hide=vfsAccess \
    62  		-hide=vfsFileSize \
    63  		-hide=vfsClose
    64  	go build -v
    65  	gofmt -l -s -w *.go
    66  	go test -o /dev/null -c
    67