1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-23 02:53:02 +01:00

Merge pull request #161 from Ansa89/fix-autoconnect

Try to fix autoconnect
This commit is contained in:
mannol1 2014-06-25 11:00:45 +02:00
commit 6c38e72654
2 changed files with 25 additions and 11 deletions

View File

@ -16,14 +16,20 @@ Toxic is an ncurses-based instant messaging client for [Tox](https://tox.im) whi
### Compiling ### Compiling
1. `cd build/` 1. `cd build/`
2. `make` 2. `make PREFIX="/where/to/install"`
3. `sudo make install DESTDIR="/where/to/install"` 3. `sudo make install PREFIX="/where/to/install"`
### Compilation Notes ### Compilation Notes
* You can add specific flags to the Makefile with `USER_CFLAGS=""` and/or `USER_LDFLAGS=""` * You can add specific flags to the Makefile with `USER_CFLAGS=""` and/or `USER_LDFLAGS=""`
* You can pass your own flags to the Makefile with `CFLAGS=""` and/or `LDFLAGS=""` (this will supersede the default ones) * You can pass your own flags to the Makefile with `CFLAGS=""` and/or `LDFLAGS=""` (this will supersede the default ones)
* Audio call support is automatically enabled if all dependencies are found * Audio call support is automatically enabled if all dependencies are found
### Packaging
* For packaging purpose, you can use `DESTDIR=""` to specify a directory where to store installed files
* `DESTDIR=""` can be used in addition to `PREFIX=""`:
* `DESTDIR=""` is meant to specify a directory where to store installed files (ex: "/tmp/build/pkg")
* `PREFIX=""` is meant to specify a prefix directory for binaries and data files (ex: "/usr/local")
### Troubleshooting ### Troubleshooting
If your default prefix is "/usr/local" and you receive the following: If your default prefix is "/usr/local" and you receive the following:
``` ```

View File

@ -2,15 +2,21 @@ TOXIC_VERSION = 0.4.2
REV = $(shell git rev-list HEAD --count) REV = $(shell git rev-list HEAD --count)
VERSION = $(TOXIC_VERSION)_r$(REV) VERSION = $(TOXIC_VERSION)_r$(REV)
LIBS = libtoxcore ncursesw
CFLAGS = -std=gnu99 -pthread -Wimplicit-function-declaration -Wreturn-type -DTOXICVER="\"$(VERSION)\""
CFLAGS += -DHAVE_WIDECHAR -D_XOPEN_SOURCE_EXTENDED
CFLAGS += $(USER_CFLAGS)
LDFLAGS = $(USER_LDFLAGS)
CFG_DIR = ../cfg CFG_DIR = ../cfg
SRC_DIR = ../src SRC_DIR = ../src
DESTDIR = /usr/local MISC_DIR = ../misc
PREFIX = /usr/local
BINDIR = $(PREFIX)/bin
DATADIR = $(PREFIX)/share/toxic
DATAFILES = $(MISC_DIR)/DHTnodes $(MISC_DIR)/toxic.conf
LIBS = libtoxcore ncursesw
CFLAGS = -std=gnu99 -pthread -Wimplicit-function-declaration -Wreturn-type
CFLAGS += -DTOXICVER="\"$(VERSION)\"" -DHAVE_WIDECHAR -D_XOPEN_SOURCE_EXTENDED
CFLAGS += -DPACKAGE_DATADIR="\"$(DATADIR)\""
CFLAGS += $(USER_CFLAGS)
LDFLAGS = $(USER_LDFLAGS)
OBJ = chat.o chat_commands.o configdir.o dns.o execute.o OBJ = chat.o chat_commands.o configdir.o dns.o execute.o
OBJ += file_senders.o friendlist.o global_commands.o groupchat.o line_info.o OBJ += file_senders.o friendlist.o global_commands.o groupchat.o line_info.o
@ -82,8 +88,10 @@ toxic: $(OBJ)
$(CC) $(CFLAGS) -o toxic $(OBJ) $(LDFLAGS) $(CC) $(CFLAGS) -o toxic $(OBJ) $(LDFLAGS)
install: toxic install: toxic
mkdir -pv $(DESTDIR)/bin @mkdir -p $(DESTDIR)/$(BINDIR)
install -m 0755 toxic $(DESTDIR)/bin @mkdir -p $(DESTDIR)/$(DATADIR)
install -m 0755 toxic $(DESTDIR)/$(BINDIR)
install -m 0644 $(DATAFILES) $(DESTDIR)/$(DATADIR)
%.o: $(SRC_DIR)/%.c %.o: $(SRC_DIR)/%.c
$(CC) $(CFLAGS) -o $*.o -c $(SRC_DIR)/$*.c $(CC) $(CFLAGS) -o $*.o -c $(SRC_DIR)/$*.c