gdr / tuntox (public) (License: GPLv3) (since 2017-01-24) (hash sha1)
Tunnel TCP connections over the Tox protocol

/Makefile (21a7406d13d6eaabf8eb25c8f97ca7c957c9ecaf) (1641 bytes) (mode 100644) (type blob)

SOURCES = $(wildcard *.c)
DEPS=toxcore
CC?=$(CC)
CFLAGS=-g -Wall #-std=c99
CFLAGS += $(shell pkg-config --cflags $(DEPS))
LDFLAGS=-g -pthread -lm -static
LDFLAGS += $(shell pkg-config --static --libs $(DEPS))
DSO_LDFLAGS=-g -pthread -lm
DSO_LDFLAGS += $(shell pkg-config --libs $(DEPS))
OBJECTS=$(SOURCES:.c=.o)
INCLUDES = $(wildcard *.h)
PYTHON = /usr/bin/env python3
INSTALL = install -C
INSTALL_MKDIR = $(INSTALL) -d -m 755
OS=$(shell uname)

ifneq ($(OS),Darwin)
	LDFLAGS += -lrt
	DSO_LDFLAGS += -lrt
endif

PREFIX ?= /usr
BINDIR ?= $(PREFIX)/bin

# Targets
all: tuntox tuntox_nostatic

gitversion.h: FORCE
	@if [ -d .git ]; then \
		echo "  GEN   $@"; \
		echo "#define GITVERSION \"$(shell git rev-parse HEAD)\"" > $@; \
	fi

termux: PREFIX=/data/data/com.termux/files/usr
termux: CFLAGS += -I$(PREFIX)/include
termux: TERMUX_LDFLAGS = -L$(PREFIX)/lib -ltoxcore -ltoxencryptsave -lsodium -lm
termux:
	$(MAKE) clean
	$(MAKE) gitversion.h tox_bootstrap.h $(OBJECTS)
	$(CC) -o tuntox $(OBJECTS) $(TERMUX_LDFLAGS)


FORCE:

tox_bootstrap.h: 
	$(PYTHON) generate_tox_bootstrap.py 

%.o: %.c $(INCLUDES) gitversion.h tox_bootstrap.h
	@echo "  CC    $@"
	@$(CC) -c $(CFLAGS) $< -o $@

tuntox: $(OBJECTS) $(INCLUDES)
	$(CC) -o $@ $(OBJECTS) -lpthread $(LDFLAGS) 

tuntox_nostatic: $(OBJECTS) $(INCLUDES)
	$(CC) -o $@ $(OBJECTS) -lpthread $(DSO_LDFLAGS) 

cscope.out:
	@echo "  GEN   $@"
	@cscope -bv ./*.[ch] &> /dev/null

clean:
	$(RM) *.o tuntox cscope.out gitversion.h tox_bootstrap.h

install: tuntox_nostatic
	$(INSTALL_MKDIR) -d $(DESTDIR)$(BINDIR)
	$(INSTALL) tuntox_nostatic $(DESTDIR)$(BINDIR)/tuntox

.PHONY: all clean tuntox termux


Mode Type Size Ref File
100644 blob 268 272c4eb3ad3672621962ce38f8c7472336729ec3 .gitignore
100644 blob 0 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 .sonarcloud.properties
100644 blob 2088 300c5a7e37f67cb8cdd88261756a10be561d51c5 .travis.yml
100644 blob 1934 9b63571486cca0d558fb18d7826e84f8983217de BUILD.md
100644 blob 890 6a32bd94ed7175124e4abdfec44db695f222584c Dockerfile
100644 blob 5517 ef1e845a2dbc716671521a95d4daae5669ea043c FAQ.md
100644 blob 36522 d6af5d577e5ccb42e451bffdb59696ae1b8078ab LICENSE.md
100644 blob 1641 21a7406d13d6eaabf8eb25c8f97ca7c957c9ecaf Makefile
100644 blob 652 6a0550489a8718388bef0ef61e36f6a0a9d8bfdf Makefile.mac
100644 blob 6184 0b50fc1618d27bab00968e773331d210ac55ed1f README.md
100644 blob 1989 f1c8658a62d5be3c1726843db101a54df9c52f47 VPN.md
100644 blob 939 d4c2844167d0a3bbe01f06adc650e28ae6d79690 bitbucket-pipelines.yml
100644 blob 77769 3063f74e9864b29839928800f1cfb0469ee74990 cJSON.c
100644 blob 15829 92907a2cd38b1e1f2e099e5cbe2f5c557b70b07b cJSON.h
100644 blob 26027 a3eb55b5c15331895fb1031128ba809d32c1301f client.c
100644 blob 759 be68f25ae57282e30acf01fd0eb619763045dc1e client.h
040000 tree - 8242200a82b7b6d771a336c7c81b4f76b8e7be84 debian
040000 tree - aecbc851d043685ef2481754b6f5835de137c8aa freebsd
100644 blob 3695 9d240e23d50d3a7bd69552eb243e686fdbe4c5b8 generate_tox_bootstrap.py
100644 blob 487 1e68c5e34dce5b725180e0d9966de2ea41848407 gitversion.c
100644 blob 62 6a0b88053934fc28584a21de71e6e31de06d222e gitversion.h
100644 blob 3141 31244349cd221b4e8931f612b3325ae59faa58cb log.c
100644 blob 892 bcd4c9bb1af0a1f1c44b1e7a36c3a5971ba73b34 log.h
100644 blob 169 57385c284c57ab99d21bd53c270ebc04ecd19d31 mach.h
100644 blob 54981 84f3e5a9ca752e8af113e8ee9891633a865e5677 main.c
100644 blob 4535 6a81b186b7efb1fbbac1ae625377d5e23a63de00 main.h
100755 blob 791 d4c9730c37f222ed6390eacbd1effb9a640dcdcb multiarch-build.sh
040000 tree - 9ea39ebb6fd8fb34f1a28a69d445d099d5001a37 screenshots
040000 tree - 1b7f67563576827104c5d31b860e163878d015d6 scripts
100644 blob 29267 df344c18c20bbe4abb1df6ed25aaf35dc491a1d2 tox_bootstrap.h
100644 blob 3337 6898c9d8e60d79b1b8122afa8665b88659e27500 tox_bootstrap_json.c
100644 blob 124 f6479b9112cbf5aab844fb733a3ab7d9f9a683b0 tox_bootstrap_json.h
100644 blob 12536 75e9dc5ed9399120416e8da5f24d1ccde41cf901 utarray.h
100644 blob 61492 7205c67efa27c66884c8d4d1c8a105d4854a0548 uthash.h
100644 blob 5454 d501ce5f53959669fd3753540ee170a065234e12 util.c
100644 blob 893 33e1cb381b18a34d413d7379121f9a8e584eaf53 util.h
100644 blob 55882 b5f3f04c104785a57d8280c37c1b19b36068e56e utlist.h
100644 blob 11555 867442c843dbe6bf096a488e3ce9ec6323809f7f utstring.h
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/gdr/tuntox

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/gdr/tuntox

Clone this repository using git:
git clone git://git.rocketgit.com/user/gdr/tuntox

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main