[Freeswitch-svn] [commit] r11545 - freeswitch/trunk/scripts/contrib/intralanman/C/tel_handler

FreeSWITCH SVN intralanman at freeswitch.org
Wed Jan 28 14:21:13 PST 2009


Author: intralanman
Date: Wed Jan 28 16:21:13 2009
New Revision: 11545

Log:
strip out extra Makefile stuff

Modified:
   freeswitch/trunk/scripts/contrib/intralanman/C/tel_handler/Makefile
   freeswitch/trunk/scripts/contrib/intralanman/C/tel_handler/tel_handler.c

Modified: freeswitch/trunk/scripts/contrib/intralanman/C/tel_handler/Makefile
==============================================================================
--- freeswitch/trunk/scripts/contrib/intralanman/C/tel_handler/Makefile	(original)
+++ freeswitch/trunk/scripts/contrib/intralanman/C/tel_handler/Makefile	Wed Jan 28 16:21:13 2009
@@ -1,25 +1,13 @@
-INCS=-I../../../../../libs/esl/src/include
-LIBEDIT_DIR=../../libs/libedit
-DEBUG=-g -ggdb
-PICKY=-O2 -ffast-math -Wall -Werror -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-CFLAGS=$(INCS) -DHAVE_EDITLINE $(DEBUG) -I$(LIBEDIT_DIR)/src/ $(PICKY)
-MYLIB=libesl.a
-LIBS=-lncurses -lpthread -lesl
-LDFLAGS=-L../../../../../libs/esl/
-OBJS=src/esl.o src/esl_event.o src/esl_threadmutex.o src/esl_config.o
-SRC=src/esl.c src/esl_event.c src/esl_threadmutex.c src/esl_config.c
-HEADERS=src/include/esl_config.h src/include/esl_event.h src/include/esl.h src/include/esl_threadmutex.h
+CFLAGS=-I../../../../../libs/esl/src/include -g -ggdb -ffast-math -Wall -Werror -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
+LDFLAGS=-L../../../../../libs/esl/ -lpthread -lesl
 
 all: tel_handler
 
 tel_handler: tel_handler.c
-	$(CC) $(CC_CFLAGS) $(CFLAGS) tel_handler.c -o tel_handler $(LDFLAGS) $(LIBS)
-
-%.o: %.c
-	$(CC) $(CC_CFLAGS) $(CFLAGS) -c $< -o $@
+	$(CC) $(CFLAGS) tel_handler.c -o tel_handler $(LDFLAGS) $(LIBS)
 
 clean:
-	rm -f *.o tel_handler *~ 
+	rm -f tel_handler 
 
 install: all
 	cp tel_handler /usr/bin/tel_handler

Modified: freeswitch/trunk/scripts/contrib/intralanman/C/tel_handler/tel_handler.c
==============================================================================
--- freeswitch/trunk/scripts/contrib/intralanman/C/tel_handler/tel_handler.c	(original)
+++ freeswitch/trunk/scripts/contrib/intralanman/C/tel_handler/tel_handler.c	Wed Jan 28 16:21:13 2009
@@ -1,19 +1,19 @@
 #include <stdio.h>
-#include <stdlib.h>
 #include <esl.h>
 
 int main(int argc, char *argv[])
 {
 	esl_handle_t handle = {{0}};
-	if(argc == 2) {
-		char buf[1024];
-		esl_connect(&handle, "localhost", 8021, "ClueCon");
-		snprintf(buf, sizeof(buf), "api pa call %s", argv[1]);
-		esl_send_recv(&handle, buf);
-		esl_disconnect(&handle);
-		return 0;
-	} else {
+	char buf[1024];
+
+	if (argc != 2) {
 		printf("Not enough args!!");
 		return 1;
 	}
+
+	esl_connect(&handle, "localhost", 8021, "ClueCon");
+	snprintf(buf, sizeof(buf), "api pa call %s", argv[1]);
+	esl_send_recv(&handle, buf);
+	esl_disconnect(&handle);
+	return 0;
 }



More information about the Freeswitch-svn mailing list