kopia lustrzana https://github.com/Hamlib/Hamlib
60 wiersze
1.1 KiB
Makefile
60 wiersze
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
|
||
|
|
||
|
|
||
|
|