1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
#
# lint configuration. I use lclint.
#
LIBRARY=libhttp.a
SHAREDLIB=libhttp.so.0
SONAME=libhttp.so.0
# List of source, object and header files
SRCS=HTTP.c cookie.c
OBJS=HTTP.o cookie.o
HEADERS=HTTP.h HTTPP.h
# Targets to make
TARGET_STATIC=$(LIBRARY)
TARGET_SHARED=$(SHAREDLIB)
# Subdirectories to visit
SUBDIRS=
# rule to create .o files from .c files
.c.o:
$(RM) $@
$(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDES) -c $<
all: $(TARGET_STATIC) $(TARGET_SHARED)
# targets to build
$(TARGET_STATIC):: $(OBJS)
$(RM) $@ \
$(AR) $@ $(OBJS)
$(RANLIB) $@
$(TARGET_SHARED):: $(OBJS)
$(RM) $@ ; \
$(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,$(SONAME) $(OBJS) $(LOADLIBES)
stamp-includes:
@if [ -d ../include ]; then set +x; \
else (set -x; mkdir ../include); fi
@if [ -d ../include/XmHTML ]; then set +x; \
else (set -x; mkdir ../include/XmHTML); fi
@(set -x; cd ../include/XmHTML; for i in $(HEADERS); do \
$(RM) $$i; \
$(LN) ../../http/$$i .; \
done)
touch $@
includes:: stamp-includes
depend:: $(SRCS)
$(MAKEDEPEND) $(INCLUDES) $(CPPFLAGS) $(SRCS)
clean::
$(RM) $(OBJS)
$(RM) $(TARGET_STATIC) $(TARGET_SHARED)
distclean:: clean
$(RM) core *.out *.log make.world *.bak *.last *.auto *.rej *.orig
$(RM) *.lh *.lcs *.lint stamp-includes
#$(CP) Makefile.org Makefile
realclean:: distclean
#--------------------------------------------------------------------------
# don't delete anything below this line, makedepend depends on it
#--------------------------------------------------------------------------
|