Makefile
上传用户:eo_sii
上传日期:2007-01-05
资源大小:91k
文件大小:2k
- #PLATFORM = LINUX
- PLATFORM = LINUX_LC6 # for GNU LibC 6
- CFLAGS = -O2
- #DEBUG = -DINCL_DEBUG_CODE
- YDEBUG = YYDEBUG=1
- DEFINES = -D$(PLATFORM) -D$(YDEBUG) $(DEBUG)
- CC = gcc
- LEX = flex -I
- YACC = bison
- PREFIX = /usr/local
- BINDIR = $(PREFIX)/bin
- MANDIR = $(PREFIX)/man
- PROGS = sms_serv sms2mailgw
- S_OBJS = sms_serv.o stuff.o serv_stuff.o gsmdevices.o mbchecker.o accessctrl.o server.tab.o lex.yy.o
- G_OBJS = sms2mailgw.o stuff.o gw_stuff.o
- #=============================================================
- all: $(PROGS)
- sms_serv: $(S_OBJS)
- $(CC) -o sms_serv $(S_OBJS) -lm -lfl -lmodem
- sms2mailgw: $(G_OBJS)
- $(CC) -o sms2mailgw $(G_OBJS)
- lex.yy.o server.tab.o: sms_serv.h
- server.tab.o: server.tab.c server.tab.h
- $(CC) $(CFLAGS) $(DEFINES) -c server.tab.c
- lex.yy.o: lex.yy.c server.tab.h
- $(CC) $(CFLAGS) $(DEFINES) -c lex.yy.c
- server.tab.c server.tab.h: server.y
- $(YACC) -d server.y
- lex.yy.c: server.l
- $(LEX) server.l
- sms_serv.o: sms_serv.c sms_serv.h
- $(CC) $(CFLAGS) $(DEFINES) -c sms_serv.c
- sms2mailgw.o: sms2mailgw.c sms_serv.h
- $(CC) $(CFLAGS) $(DEFINES) -c sms2mailgw.c
- stuff.o: stuff.c sms_serv.h
- $(CC) $(CFLAGS) $(DEFINES) -c stuff.c
-
- serv_stuff.o: serv_stuff.c sms_serv.h
- $(CC) $(CFLAGS) $(DEFINES) -c serv_stuff.c
-
- gw_stuff.o: gw_stuff.c sms_serv.h
- $(CC) $(CFLAGS) $(DEFINES) -c gw_stuff.c
-
- mbchecker.o: mbchecker.c sms_serv.h
- $(CC) $(CFLAGS) $(DEFINES) -c mbchecker.c
-
- accessctrl.o: accessctrl.c sms_serv.h
- $(CC) $(CFLAGS) $(DEFINES) -c accessctrl.c
-
- gsmdevices.o: gsmdevices.c sms_serv.h
- $(CC) $(CFLAGS) $(DEFINES) -c gsmdevices.c
-
- install: $(PROGS)
- install -g bin -o root -m 755 sms_serv $(BINDIR)
- strip $(BINDIR)/sms_serv
- install -g bin -o root -m 755 sms2mailgw $(BINDIR)
- strip $(BINDIR)/sms2mailgw
- install -g bin -o root -m 644 sms_serv.1 $(MANDIR)/man1
- install -g bin -o root -m 644 sms2mailgw.1 $(MANDIR)/man1
- install -g bin -o root -m 644 gsmdevices.5 $(MANDIR)/man5
- install -g bin -o root -m 644 gsmaccess.5 $(MANDIR)/man5
- listing:
- nenscript -G Makefile sms_serv.c stuff.c serv_stuff.c
- gsmdevices.c mbchecker.c accessctrl.c sms_serv.h server.y
- server.l
- sms2mailgw.c gw_stuff.c
- TODO BUGS INSTALL gsmdevices gsmaccess
- man -l ./sms_serv.1 -t | lpr
- man -l ./sms2mailgw.1 -t | lpr
- man -l ./gsmdevices.5 -t | lpr
- man -l ./gsmaccess.5 -t | lpr
- clean:
- rm -f core $(PROGS) *.o *~ server.tab.c server.tab.h lex.yy.c