Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
58 lines (46 loc) · 1.62 KB
/
Copy pathMakefile
File metadata and controls
58 lines (46 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
export CC=clang
CANINTERFACES=canlib,canusb,combi,ftdi,j2534,pcan,rcan,socketcan
OTHER=wayland
BUILDTAGS=$(CANINTERFACES),$(OTHER)
ifdef EXTRA_TAGS
BUILDTAGS:=$(CANINTERFACES),$(EXTRA_TAGS)
endif
default: txlogger
pkg/ota/firmware.bin: /home/roffe/Documents/PlatformIO/Projects/txbridge/.pio/build/esp32dev/firmware.bin
@cp $< $@
txlogger:
go build -tags=$(BUILDTAGS) -ldflags '-s -w' -o txlogger .
release:
fyne package -tags=$(BUILDTAGS) --release
debug: clean
@echo Using compiler "$(CC)"
-go run -tags=$(BUILDTAGS),debug . 2>&1 | tee run.log
windows:
CGO_CFLAGS="-Ivcpkg/packages/libusb_x64-windows/include/libusb-1.0" \
CGO_LDFLAGS="-Lvcpkg/packages/libusb_x64-windows/lib" \
CGO_ENABLED=1 \
CC=x86_64-w64-mingw32-gcc \
GOARCH=amd64 \
GOOS=windows \
fyne package --os windows --icon Icon.png -tags=$(BUILDTAGS) --release \
GOARCH=386 \
go build -tags=j2534 -ldflags '-s -w' -o j2534proxy.exe ./j2534proxy
windows-dx:
CGO_CFLAGS="-Ivcpkg/packages/libusb_x64-windows/include/libusb-1.0" \
CGO_LDFLAGS="-Lvcpkg/packages/libusb_x64-windows/lib" \
CGO_ENABLED=1 \
CC=x86_64-w64-mingw32-gcc \
GOARCH=amd64 \
GOOS=windows \
fyne package --os windows --icon Icon.png --name txlogger-dx.exe -tags=$(BUILDTAGS),directx --release \
GOARCH=386 \
go build -tags=j2534,dx -ldflags '-s -w' -o j2534proxy.exe ./j2534proxy
run: clean pkg/ota/firmware.bin
@echo Using compiler "$(CC)"
-GOEXPERIMENT=simd go run -tags=$(BUILDTAGS) . 2>&1 | tee run.log
clean:
rm -f cangateway j2534proxy.exe
rm -f txlogger
.PHONY: j2534proxy
j2534proxy:
GOOS=windows GOARCH=386 go build -tags="j2534" -ldflags '-s -w' -o j2534proxy.exe ./j2534proxy