Makefile
上传用户:mei_mei897
上传日期:2007-01-05
资源大小:82k
文件大小:5k
- # --------------------------------------------------------------------
- # SMS Client, send messages to mobile phones and pagers
- #
- # Makefile
- #
- # Copyright (C) 1997,1998 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: Makefile,v 5.1 1998/02/01 07:10:39 root Exp root $
- # --------------------------------------------------------------------
- include ../../Makefile.config
- # --------------------------------------------------------------------
- all: ../../bin/sms_client ../../bin/sms_address
- install: ../../bin/sms_client ../../bin/sms_address
- $(INSTALL) -m 755 -d $(BINDIR)
- $(INSTALL) -s -o root -g root -m 755 ../../bin/sms_client $(BINDIR)
- $(INSTALL) -s -o root -g root -m 755 ../../bin/sms_address $(BINDIR)
- uninstall:
- $(RM) $(BINDIR)/sms_client
- $(RM) $(BINDIR)/sms_address
-
- clean:
- $(RM) ../../bin/sms_client ../../bin/sms_address *.o *.bak core
- # --------------------------------------------------------------------
- INCLUDE=-I.. -I../driver
- # --------------------------------------------------------------------
-
- driver_lib:
- cd ../driver ; $(MAKE)
- parser_lib:
- cd ../parser ; $(MAKE)
- # --------------------------------------------------------------------
- sms_client.o: sms_client.c expect.h parserc.h sms_list.h ../driver/driver.h ../logfile.h ../sms_error.h ../../Makefile.config
- $(CC) $(CFLAGS) -c sms_client.c -DMVERSION=""$(MVERSION)"" -DMSERVICEDIR=""$(MSERVICEDIR)"" -DMLOGLEVEL=3 -DMLOGFILE=""$(MLOGFILE)"" $(INCLUDE)
- sms_address.o: sms_address.c parserc.h sms_list.h ../../Makefile.config
- $(CC) $(CFLAGS) -c sms_address.c -DMVERSION=""$(MVERSION)"" $(INCLUDE)
- expect.o: expect.c ../logfile.h ../sms_error.h
- $(CC) $(CFLAGS) -c expect.c $(INCLUDE)
- sms_modem.o: sms_modem.c sms_modem.h parserc.h ../logfile.h ../../Makefile.config
- $(CC) $(CFLAGS) -c sms_modem.c -DMMODEMDIR=""$(MSERVICEDIR)"" $(INCLUDE)
-
- sms_lock.o: sms_lock.c ../logfile.h
- $(CC) $(CFLAGS) -c sms_lock.c $(INCLUDE)
- token.o: token.c
- $(CC) $(CFLAGS) -c token.c $(INCLUDE)
- sms_tcpip.o: sms_tcpip.c sms_tcpip.h
- $(CC) $(CFLAGS) -c sms_tcpip.c $(INCLUDE)
- sms_list.o: sms_list.c sms_list.h ../sms_error.h ../logfile.h
- $(CC) $(CFLAGS) -c sms_list.c $(INCLUDE)
- sms_resource.o: sms_resource.c sms_resource.h
- $(CC) $(CFLAGS) -c sms_resource.c $(INCLUDE)
- parserc.o: ../logfile.h parserc.h parserc.c ../sms_error.h sms_list.h ../driver/driver.h ../../Makefile.config token.h
- $(CC) $(CFLAGS) -c parserc.c -DMLOCALSMSRC=""$(MLOCALSMSRC)"" -DMGLOBALSMSRC=""$(MGLOBALSMSRC)"" -DMSERVICEDIR=""$(MSERVICEDIR)"" -DMMODEMDIR=""$(MMODEMDIR)"" $(INCLUDE)
- # --------------------------------------------------------------------
- MLIBS =
- MOBJS =
- ifeq ($(MODEMLIB),$(LIBMODEM))
- MLIBS = -lmodem
- endif
- ifeq ($(MODEMLIB),$(SMSMODEM))
- MOBJS = sms_modem.o
- endif
- # --------------------------------------------------------------------
- ../../bin/sms_client: sms_client.o expect.o parserc.o $(MOBJS) ../logfile.o sms_list.o token.o driver_lib sms_resource.o sms_tcpip.o sms_lock.o ../common.o parser_lib
- $(CC) $(CFLAGS) -o ../../bin/sms_client sms_client.o expect.o parserc.o $(MOBJS) ../logfile.o sms_list.o ../driver/sms_driver.a token.o sms_resource.o $(MLIBS) sms_tcpip.o sms_lock.o ../common.o $(XTRALIBS) ../parser/gs_parser.a
- ../../bin/sms_address: sms_address.o parserc.o sms_list.o expect.o $(MOBJS) token.o driver_lib sms_resource.o sms_tcpip.o sms_lock.o ../common.o parser_lib
- $(CC) $(CFLAGS) -o ../../bin/sms_address sms_address.o parserc.o sms_list.o ../logfile.o expect.o $(MOBJS) ../driver/sms_driver.a token.o sms_resource.o $(MLIBS) sms_tcpip.o sms_lock.o ../common.o $(XTRALIBS) ../parser/gs_parser.a
- # --------------------------------------------------------------------
- ../logfile.o: ../logfile.c ../logfile.h
- cd .. ; make logfile.o
- ../common.o: ../common.c ../common.h
- cd .. ; make common.o
- # --------------------------------------------------------------------