LCR now runs as a user.
[lcr.git] / Makefile
index ce4b9fb..171b57b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -47,8 +47,8 @@ endif
 ifdef WITH-CRYPTO
 LIBDIR += -L/usr/local/ssl/lib
 CFLAGS += -I/usr/local/ssl/include
-#LIBS += -lcrypto
-LIBS += /usr/local/ssl/lib/libcrypto.a
+LIBS += -lcrypto
+#LIBS += /usr/local/ssl/lib/libcrypto.a
 endif
 
 #all:
@@ -64,7 +64,6 @@ all: $(CHAN_LCR) $(LCR) $(LCRADMIN) $(GEN) $(GENW) $(GENRC) $(GENEXT)
        @sh -c 'grep -n sprintf *.c* --exclude chan_lcr.c --exclude bchannel.c --exclude callerid.c ; if test $$''? = 0 ; then echo "dont use sprintf, use makro instead." ; exit -1 ; fi'
        @sh -c 'grep -n snprintf *.c* --exclude chan_lcr.c --exclude bchannel.c --exclude callerid.c ; if test $$''? = 0 ; then echo "dont use snprintf, use makro instead." ; exit -1 ; fi'
        @echo "All LCR binaries done"
-       @sync
        @exit
 
 main.o: main.c *.h Makefile
@@ -197,7 +196,7 @@ $(LCR): main.o \
        socket_server.o \
        trace.o
        $(PP) $(LIBDIR) \
-               main.o \
+       main.o \
        options.ooo \
        interface.o \
        extension.o \
@@ -226,9 +225,9 @@ $(LCR): main.o \
        trace.o \
        $(LIBS) -o $(LCR) 
 
-$(LCRADMIN): lcradmin.c cause.c *.h Makefile
+$(LCRADMIN): lcradmin.c cause.c options.c *.h Makefile
        $(PP) $(LIBDIR) $(CFLAGS_LCRADMIN) $(CURSES) -lm lcradmin.c cause.c \
-       -o $(LCRADMIN) 
+       options.c -o $(LCRADMIN) 
 
 $(CHAN_LCR): chan_lcr.o bchannel.o callerid.o options.o *.h Makefile
        $(CC) -shared -Xlinker -x $(LDFLAGS) -o $(CHAN_LCR) chan_lcr.o bchannel.o callerid.o options.o
@@ -260,7 +259,6 @@ $(GENEXT): options.ooo extension.o genext.o
 
 install:
        make
-       -killall -9 -w -q lcr # the following error must be ignored
        cp $(LCR) $(INSTALL_BIN)
        cp $(LCRADMIN) $(INSTALL_BIN)
 ifdef WITH-ASTERISK
@@ -304,12 +302,11 @@ endif
        @if test -a $(INSTALL_DATA)/tones_efi ; then \
                echo "NOTE: special efi tones already exists, not overwritten." ; else \
                cp -a tones_efi $(INSTALL_DATA) ; fi
-       sync
 
 clean:
        touch *
        rm -f $(LCR) $(LCRADMIN) $(CHAN_LCR) $(LCRWATCH) $(GEN) $(GENW) $(GENRC) $(GENEXT)
-       rm -f *.o
+       rm -f *.o *.ooo
        rm -f .*.c.sw* .*.cpp.sw* .*.h.sw*
        rm -f bla nohup.out a.out
        rm -f debug*.log
@@ -319,18 +316,9 @@ tar:
        cd .. &&  tar --exclude=.git -cvzf lcr_`date +%Y%m%d`.tar.gz lcr
 
 start: $(LCR)
-       sync
-       -killall -9 -w -q lcr # the following error must be ignored
-       $(LCR) start
-
-s: $(LCR)
-       sync
-       -killall -9 -w -q lcr # the following error must be ignored
        $(LCR) start
 
 fork: $(LCR)
-       sync
-       -killall -9 -w -q lcr # the following error must be ignored
        $(LCR) fork
 
 snapshot: clean