# -------------------------------------------------------------------- # SMS Client, send messages to mobile phones and pagers # # Makefile # # Copyright (C) 1997,1998,1999 Angelo Masci # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library 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 # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # # You can contact the author at this e-mail address: # # angelo@styx.demon.co.uk # # -------------------------------------------------------------------- # $Id$ # -------------------------------------------------------------------- include ../../Makefile.config include ../../Makefile.modemlib # -------------------------------------------------------------------- all: ../../bin/sms_queue install: ../../bin/sms_queue $(INSTALL) -s -o $(SMSUSER) -g $(SMSGROUP) -m 755 ../../bin/sms_queue $(BINDIR) uninstall: $(RM) $(BINDIR)/queue test: test/test_queue test/test_write clean: $(RM) *.o $(RM) *.bak $(RM) test/test_queue test/test_write $(RM) ../../bin/sms_queue # -------------------------------------------------------------------- INCLUDE = -I.. -I../parser # -------------------------------------------------------------------- libparser: cd ../parser ; $(MAKE) libparser.a gs_api: cd ../parser/parser_api ; $(MAKE) gs_api.a resource: cd ../resource ; $(MAKE) libresource.a driver: cd ../driver ; $(MAKE) lock: cd ../lock ; $(MAKE) liblock.a comms: cd ../comms ; $(MAKE) libcomms.a # -------------------------------------------------------------------- version.h: ../../.version echo "#define MVERSION \"`awk '{ print $1 }' ../../.version`\"" >version.h # -------------------------------------------------------------------- npipe.o: npipe.c ../common/common.h ../logfile/logfile.h npipe.h $(CC) $(CFLAGS) -c npipe.c $(INCLUDE) process.o: process.c ../common/common.h ../logfile/logfile.h process.h $(CC) $(CFLAGS) -c process.c $(INCLUDE) fread.o: fread.c $(CC) $(CFLAGS) -c fread.c $(INCLUDE) test/test_queue.o: test/test_queue.c ../common/common.h ../logfile/logfile.h npipe.h $(CC) $(CFLAGS) -c test/test_queue.c -o test/test_queue.o $(INCLUDE) queue.o: queue.c ../common/common.h ../logfile/logfile.h npipe.h version.h $(CC) $(CFLAGS) -c queue.c $(INCLUDE) -DMSERVICEDIR="\"$(MSERVICEDIR)\"" -DMSMSDLOGLEVEL=3 -DMSMSDLOGFILE="\"$(MSMSDLOGFILE)\"" test/test_write.o: test/test_write.c ../common/common.h ../logfile/logfile.h $(CC) $(CFLAGS) -c test/test_write.c -o test/test_write.o $(INCLUDE) # -------------------------------------------------------------------- ../../bin/sms_queue: queue.o fread.o npipe.o process.o ../logfile/logfile.o libcommon libparser gs_api resource lock driver comms ../../Makefile.modemlib $(CC) $(CFLAGS) queue.o fread.o npipe.o process.o -o ../../bin/sms_queue ../logfile/logfile.o ../resource/libresource.a ../parser/libparser.a ../parser/parser_api/gs_api.a ../lock/liblock.a ../driver/sms_driver.a ../comms/libcomms.a ../common/libcommon.a $(MLIBS) $(XTRALIBS) # -------------------------------------------------------------------- test/test_queue: test/test_queue.o npipe.o process.o ../common/common.h ../logfile/logfile.h npipe.h process.h $(CC) $(CFLAGS) test/test_queue.o npipe.o -o test/test_queue ../logfile/logfile.o ../common/libcommon.a $(MLIBS) $(XTRALIBS) test/test_write: test/test_write.o ../common/common.h ../logfile/logfile.h npipe.h $(CC) $(CFLAGS) test/test_write.o -o test/test_write ../logfile/logfile.o ../common/libcommon.a $(MLIBS) $(XTRALIBS) # -------------------------------------------------------------------- ../logfile/logfile.o: ../logfile/logfile.c ../logfile/logfile.h cd ../logfile ; $(MAKE) logfile.o libcommon: cd ../common ; $(MAKE) libcommon.a # --------------------------------------------------------------------