Hamlib/common/Makefile.testrig
Frank Singleton, VK3FCS 49edbb6919 makefile for testing testrig linking
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@160 7ae35d74-ebe9-4afe-98af-79ac388436b8
2000-09-29 03:15:30 +00:00

60 lines
1.1 KiB
Makefile

# 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