2000-07-25 01:01:00 +00:00
|
|
|
# hamlib - (C) Frank Singleton 2000 (vk3fcs@ix.netcom.com)
|
|
|
|
#
|
2000-09-23 04:55:44 +00:00
|
|
|
# libhamlib - (C) 2000 Frank Singleton and Stephane Fillod
|
|
|
|
# This shared library provides a frontend API for communicating
|
|
|
|
# to backend shared libs for control of Ham Radio Equipment,
|
|
|
|
# via serial interface.
|
2000-07-25 01:01:00 +00:00
|
|
|
#
|
|
|
|
#
|
|
|
|
#
|
2000-09-23 04:55:44 +00:00
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
#
|
2000-07-25 01:01:00 +00:00
|
|
|
#
|
2000-09-23 04:55:44 +00:00
|
|
|
# Simple Make file for common parts, and modified to create
|
|
|
|
# libhamlib.so -- FS
|
2000-07-25 01:01:00 +00:00
|
|
|
#
|
2000-09-23 04:55:44 +00:00
|
|
|
#
|
|
|
|
#
|
|
|
|
# $Id: Makefile,v 1.5 2000-09-23 04:55:44 javabear Exp $
|
|
|
|
#
|
|
|
|
#
|
|
|
|
|
|
|
|
LIB_NAME = libhamlib.so
|
|
|
|
LIB_SONAME = libhamlib.so.1
|
|
|
|
LIB_RELEASE = libhamlib.so.1.0.1
|
|
|
|
|
|
|
|
INCLUDE = -I/usr/include -I/usr/local/include -I. -I../common
|
|
|
|
|
|
|
|
|
|
|
|
LIB_HEADER = rig.h serial.h
|
|
|
|
LIB_SRC = rig.c serial.c
|
|
|
|
LIB_OBJECTS = serial.o rig.o
|
|
|
|
|
2000-07-25 01:01:00 +00:00
|
|
|
|
|
|
|
CC = gcc
|
|
|
|
INCLUDE = -I/usr/include -I/usr/local/include -I. -I../include
|
2000-09-23 02:26:27 +00:00
|
|
|
OBJ = serial.o rig.o testrig.o
|
2000-07-25 01:01:00 +00:00
|
|
|
LDFLAG = -lm
|
2000-09-16 01:21:07 +00:00
|
|
|
# -ansi would break usleep, CRTSCTS, etc.
|
2000-09-23 04:55:44 +00:00
|
|
|
CFLAGS = -g -Wall -D__USE_FIXED_PROTOTYPES__ -pedantic -fPIC -g -Wall
|
2000-09-23 02:26:27 +00:00
|
|
|
MAKEALL = $(OBJ)
|
2000-07-25 01:01:00 +00:00
|
|
|
|
|
|
|
all: $(MAKEALL)
|
|
|
|
|
|
|
|
serial.o: serial.c serial.h
|
|
|
|
$(CC) $(CFLAGS) $(INCLUDE) -c serial.c
|
|
|
|
|
2000-09-16 01:21:07 +00:00
|
|
|
rig.o: rig.c rig.h riglist.h
|
2000-09-14 00:52:27 +00:00
|
|
|
$(CC) $(CFLAGS) $(INCLUDE) -c rig.c
|
|
|
|
|
2000-09-23 04:55:44 +00:00
|
|
|
testrig.o: testrig.c rig.h
|
2000-09-23 02:26:27 +00:00
|
|
|
$(CC) $(CFLAGS) $(INCLUDE) -c testrig.c
|
2000-09-14 00:52:27 +00:00
|
|
|
|
2000-07-25 01:01:00 +00:00
|
|
|
# clean up
|
|
|
|
|
|
|
|
clean:
|
|
|
|
make cleanlocal
|
|
|
|
|
|
|
|
# clean up local directory
|
|
|
|
|
|
|
|
.PHONY: cleanlocal
|
|
|
|
cleanlocal:
|
2000-09-23 02:26:27 +00:00
|
|
|
rm -f *.o
|
2000-09-23 04:55:44 +00:00
|
|
|
rm -f $(LIB_RELEASE)
|
|
|
|
|
|
|
|
|
|
|
|
# test making a shared lib (at last) for the frontend -- FS
|
|
|
|
# still lots to cleanup.
|
2000-07-25 01:01:00 +00:00
|
|
|
|
2000-09-23 04:55:44 +00:00
|
|
|
.PHONY: hamlib
|
|
|
|
hamlib:
|
|
|
|
$(CC) $(CFLAGS) $(INCLUDE) -c $(LIB_SRC)
|
|
|
|
$(CC) -shared -Wl,-soname,$(LIB_SONAME) -o $(LIB_RELEASE) $(LIB_OBJECTS) -lc
|
2000-07-25 01:01:00 +00:00
|
|
|
|