From 79233b7574209edc78fac9916c8e72e2158a0937 Mon Sep 17 00:00:00 2001 From: Determinant Date: Thu, 5 Dec 2019 18:28:03 -0500 Subject: WIP: remove-adhoc-flags --- Makefile | 6 ++++++ salticidae.go | 2 -- stream.go | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 25bcc8b..89b6b7e 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,9 @@ +# NOTE: this Makefile only serves the purpose as an example (works on my +# Linux). Your Go project uses salticidae-go should setup CGO environment +# variables properly to have a successful build. +# +# TODO: improve this Makefile + .PHONY: all clean all: build/test_msgnet build/test_p2p_stress build/test_msgnet_tls build/bench_network diff --git a/salticidae.go b/salticidae.go index 8676a3d..f977fbd 100644 --- a/salticidae.go +++ b/salticidae.go @@ -1,7 +1,5 @@ package salticidae -// #cgo CFLAGS: -I${SRCDIR}/salticidae/include/ -// #cgo LDFLAGS: ${SRCDIR}/salticidae/libsalticidae.so -Wl,-rpath=${SRCDIR}/salticidae/ // #include "salticidae/util.h" import "C" import "unsafe" diff --git a/stream.go b/stream.go index c28f070..3127224 100644 --- a/stream.go +++ b/stream.go @@ -2,6 +2,7 @@ package salticidae // #include // #include "salticidae/stream.h" +// #include "salticidae/endian.h" // uint16_t _salti_htole16(uint16_t x) { return htole16(x); } // uint32_t _salti_htole32(uint32_t x) { return htole32(x); } // uint64_t _salti_htole64(uint64_t x) { return htole64(x); } -- cgit v1.2.3-70-g09d2