mirror of
https://github.com/Hamlib/Hamlib.git
synced 2024-09-27 05:18:24 +00:00
makefile for testing testrig linking
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@160 7ae35d74-ebe9-4afe-98af-79ac388436b8
This commit is contained in:
parent
bdfd45473e
commit
49edbb6919
@ -27,7 +27,7 @@
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# $Id: Makefile,v 1.9 2000-09-24 23:51:05 javabear Exp $
|
# $Id: Makefile,v 1.10 2000-09-29 03:15:30 javabear Exp $
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
@ -37,15 +37,15 @@ INSTALL_INCLUDEDIR = ./include/
|
|||||||
INCLUDE = -I/usr/include -I/usr/local/include -I. -I../common
|
INCLUDE = -I/usr/include -I/usr/local/include -I. -I../common
|
||||||
|
|
||||||
LIB_NAME = libhamlib.so
|
LIB_NAME = libhamlib.so
|
||||||
LIB_SONAME = libhamlib.so.1
|
LIB_SONAME = libhamlib.so.0
|
||||||
LIB_RELEASE = libhamlib.so.1.0.1
|
LIB_RELEASE = libhamlib.so.0.0.1
|
||||||
LIB_HEADER = rig.h serial.h riglist.h
|
LIB_HEADER = rig.h serial.h riglist.h
|
||||||
LIB_SRC = rig.c serial.c
|
LIB_SRC = rig.c serial.c
|
||||||
LIB_OBJECTS = serial.o rig.o
|
LIB_OBJECTS = serial.o rig.o
|
||||||
|
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
INCLUDE = -I/usr/include -I/usr/local/include -I. -I../include
|
INCLUDE = -I/usr/include -I/usr/local/include -I. -I./include
|
||||||
OBJ = serial.o rig.o #testrig.o
|
OBJ = serial.o rig.o #testrig.o
|
||||||
LDFLAG = -lm
|
LDFLAG = -lm
|
||||||
|
|
||||||
|
59
common/Makefile.testrig
Normal file
59
common/Makefile.testrig
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
# hamlib - (C) Frank Singleton 2000 (vk3fcs@ix.netcom.com)
|
||||||
|
#
|
||||||
|
# testrig - (C) Frank Singleton 2000 (vk3fcs@ix.netcom.com)
|
||||||
|
# This program uses libhamlib.so to test an API for communicating
|
||||||
|
# to ham radio equipment.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# Make file for testrig.c test suite.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# $Id: Makefile.testrig,v 1.1 2000-09-29 03:15:30 javabear Exp $
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
TEST_LIBDIR = ./lib
|
||||||
|
TEST_INCLUDEDIR = ./include
|
||||||
|
|
||||||
|
LIB_HEADER = rig.h riglist.h serial.h
|
||||||
|
|
||||||
|
# access to common stuff
|
||||||
|
COMMON_DIR = ./
|
||||||
|
|
||||||
|
CC = gcc
|
||||||
|
INCLUDE = -I/usr/include -I/usr/local/include -I$(TEST_INCLUDEDIR)
|
||||||
|
OBJ = testrig.o
|
||||||
|
LDFLAG = -lm -lhamlib -L$(TEST_LIBDIR)
|
||||||
|
CFLAGS = -g -Wall -pedantic -O2 -D__USE_FIXED_PROTOTYPES__
|
||||||
|
MAKEALL = testrig
|
||||||
|
|
||||||
|
all: $(MAKEALL)
|
||||||
|
|
||||||
|
testrig: $(OBJ)
|
||||||
|
$(CC) $(CFLAGS) $(INCLUDE) $(LDFLAG) -o testrig $(OBJ)
|
||||||
|
|
||||||
|
testrig.o: testrig.c
|
||||||
|
$(CC) $(CFLAGS) $(INCLUDE) -c testrig.c
|
||||||
|
|
||||||
|
# clean up
|
||||||
|
|
||||||
|
clean:
|
||||||
|
make cleanlocal
|
||||||
|
|
||||||
|
# clean up local directory
|
||||||
|
|
||||||
|
.PHONY: cleanlocal
|
||||||
|
cleanlocal:
|
||||||
|
rm -f *.o testrig
|
||||||
|
|
||||||
|
# run test program in local directory and check linking
|
||||||
|
|
||||||
|
.PHONY: runtest
|
||||||
|
runtest:
|
||||||
|
LD_LIBRARY_PATH="./lib" ./testrig ; ldd ./testrig
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -40,9 +40,16 @@
|
|||||||
* The rig_base is a variable length rig_caps* array, NULL terminated
|
* The rig_base is a variable length rig_caps* array, NULL terminated
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if 0
|
||||||
static const struct rig_caps *rig_base[] = {
|
static const struct rig_caps *rig_base[] = {
|
||||||
&ft747_caps, &ic706_caps, &ic706mkiig_caps, /* ... */ NULL, };
|
&ft747_caps, &ic706_caps, &ic706mkiig_caps, /* ... */ NULL, };
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define MAXRIGSIZE 10
|
||||||
|
static const struct rig_caps *rig_base[MAXRIGSIZE];
|
||||||
|
|
||||||
|
|
||||||
static const char *rigerror_table[] = {
|
static const char *rigerror_table[] = {
|
||||||
"Command completed sucessfully",
|
"Command completed sucessfully",
|
||||||
"Invalid parameter",
|
"Invalid parameter",
|
||||||
|
Loading…
Reference in New Issue
Block a user