- added a better comment for serial devices in the generated config file

- added -lX11 to LDFLAGS. aparently it's not linked indirectly through gtk on some systems...


git-svn-id: svn+ssh://svn.code.sf.net/p/spacenav/code/trunk/spnavcfg@114 ef983eb1-d774-4af8-acfd-baaf7b16a646
pull/1/head
John Tsiombikas 2011-03-07 03:05:37 +00:00
rodzic 633a76abf6
commit dfad2e2a90
2 zmienionych plików z 6 dodań i 2 usunięć

Wyświetl plik

@ -6,7 +6,7 @@ warn = -Wall -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast
CC = gcc
INSTALL = install
CFLAGS = -pedantic $(warn) $(dbg) $(opt) `pkg-config --cflags gtk+-2.0`
LDFLAGS = `pkg-config --libs gtk+-2.0`
LDFLAGS = `pkg-config --libs gtk+-2.0` -lX11
$(bin): $(obj)
$(CC) -o $@ $(obj) $(LDFLAGS)

Wyświetl plik

@ -240,9 +240,13 @@ int write_cfg(const char *fname, struct cfg *cfg)
fprintf(fp, "led = 0\n\n");
}
fprintf(fp, "# serial device\n");
fprintf(fp, "# Set this only if you have a serial device, and make sure you specify the\n");
fprintf(fp, "# correct device file (On linux usually: /dev/ttyS0, /dev/ttyS1, /dev/ttyUSB0 ... etc).\n");
if(cfg->serial_dev[0]) {
fprintf(fp, "# serial device\n");
fprintf(fp, "serial = %s\n\n", cfg->serial_dev);
} else {
fprintf(fp, "#serial = /dev/ttyS0\n");
}
/* unlock */