# -------------------------------------------------------------------- # 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 # -------------------------------------------------------------------- all: ../../bin/smsd ../../bin/snppd install: ../../bin/smsd ../../bin/snppd $(INSTALL) -o $(SMSUSER) -g $(SMSGROUP) -m 755 -s ../../bin/smsd $(BINDIR) $(INSTALL) -o $(SMSUSER) -g $(SMSGROUP) -m 755 -s ../../bin/snppd $(BINDIR) uninstall: $(RM) $(BINDIR)/smsd $(RM) $(BINDIR)/snppd clean: $(RM) *.o *.bak ../../bin/smsd ../../bin/snppd # -------------------------------------------------------------------- INCLUDE = -I.. libparser: cd ../parser ; $(MAKE) libparser.a lock: cd ../lock ; $(MAKE) liblock.a resource: cd ../resource ; $(MAKE) libresource.a # -------------------------------------------------------------------- version.h: ../../.version echo "#define MVERSION \"`awk '{ print $1 }' ../../.version`\"" >version.h # -------------------------------------------------------------------- server.o: server.c ../common/common.h ../logfile/logfile.h server.h $(CC) $(CFLAGS) -c server.c $(INCLUDE) snppd.o: snppd.c ../logfile/logfile.h server.h ../common/common.h ../../Makefile.config version.h $(CC) $(CFLAGS) -c snppd.c -DMSNPPDLOGLEVEL=3 -DMSNPPDLOGFILE="\"$(MSNPPDLOGFILE)\"" $(INCLUDE) smsd.o: smsd.c ../logfile/logfile.h server.h ../common/common.h ../../Makefile.config ../resource/resource.h version.h $(CC) $(CFLAGS) -c smsd.c -DMSERVICEDIR="\"$(MSERVICEDIR)\"" -DMSMSDLOGLEVEL=3 -DMSMSDLOGFILE="\"$(MSMSDLOGFILE)\"" $(INCLUDE) ../../bin/smsd: smsd.o server.o ../logfile/logfile.o libcommon resource libparser lock $(CC) $(CFLAGS) -o ../../bin/smsd smsd.o server.o ../logfile/logfile.o ../resource/libresource.a ../lock/liblock.a ../parser/libparser.a ../common/libcommon.a $(XTRALIBS) ../../bin/snppd: snppd.o server.o ../logfile/logfile.o libcommon lock $(CC) $(CFLAGS) -o ../../bin/snppd snppd.o server.o ../logfile/logfile.o ../lock/liblock.a ../common/libcommon.a $(XTRALIBS) # -------------------------------------------------------------------- ../logfile/logfile.o: ../logfile/logfile.c ../logfile/logfile.h cd ../logfile ; $(MAKE) logfile.o libcommon: cd ../common ; $(MAKE) libcommon.a # --------------------------------------------------------------------