Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

53 lines (41 sloc) 1.533 kb
DESTDIR =
PREFIX = /usr/local
MAJOR = 1
MINOR = 9
REVISION = 3
LIB = libcli.so
CC = gcc
DEBUG = -g
OPTIM = -O3
CFLAGS += $(DEBUG) $(OPTIM) -Wall -Wformat-security -Wno-format-zero-length
LDFLAGS += -shared -Wl,-soname,$(LIB).$(MAJOR).$(MINOR)
LIBPATH += -L.
LIBS = -lcrypt
all: $(LIB) clitest
$(LIB): libcli.o
$(CC) -o $(LIB).$(MAJOR).$(MINOR).$(REVISION) $^ $(LDFLAGS) $(LIBS)
-rm -f $(LIB) $(LIB).$(MAJOR).$(MINOR)
ln -s $(LIB).$(MAJOR).$(MINOR).$(REVISION) $(LIB).$(MAJOR).$(MINOR)
ln -s $(LIB).$(MAJOR).$(MINOR) $(LIB)
%.o: %.c
$(CC) $(CPPFLAGS) $(CFLAGS) -fPIC -o $@ -c $<
libcli.o: libcli.h
clitest: clitest.o $(LIB)
$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< -L. -lcli
clitest.exe: clitest.c libcli.o
$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< libcli.o -lws2_32
clean:
rm -f *.o $(LIB)* clitest
install: $(LIB)
install -d $(DESTDIR)$(PREFIX)/include $(DESTDIR)$(PREFIX)/lib
install -m 0644 libcli.h $(DESTDIR)$(PREFIX)/include
install -m 0755 $(LIB).$(MAJOR).$(MINOR).$(REVISION) $(DESTDIR)$(PREFIX)/lib
cd $(DESTDIR)$(PREFIX)/lib && \
ln -s $(LIB).$(MAJOR).$(MINOR).$(REVISION) $(LIB).$(MAJOR).$(MINOR) && \
ln -s $(LIB).$(MAJOR).$(MINOR) $(LIB)
rpm:
mkdir libcli-$(MAJOR).$(MINOR).$(REVISION)
cp -R *.c *.h Makefile Doc README *.spec libcli-$(MAJOR).$(MINOR).$(REVISION)
tar zcvf libcli-$(MAJOR).$(MINOR).$(REVISION).tar.gz --exclude CVS --exclude *.tar.gz libcli-$(MAJOR).$(MINOR).$(REVISION)
rm -rf libcli-$(MAJOR).$(MINOR).$(REVISION)
rpm -ta libcli-$(MAJOR).$(MINOR).$(REVISION).tar.gz --clean
Jump to Line
Something went wrong with that request. Please try again.