ifeq ($(SSL),YES)
ifneq ($(GEMINI),NO)
OBJS += ./Gemini.o
-FLAGS += -DGEMINI_SUPPORT
endif
endif
ifneq ($(HTTP),NO)
OBJS += ./HTTP.o
-FLAGS += -DHTTP_SUPPORT
endif
ifneq ($(GOPHER),NO)
OBJS += ./Gopher.o
-FLAGS += -DGOPHER_SUPPORT
endif
ifneq ($(POP3),NO)
OBJS += ./POP3.o
-FLAGS += -DPOP3_SUPPORT
endif
ifneq ($(FINGER),NO)
OBJS += ./Finger.o
-FLAGS += -DFINGER_SUPPORT
endif
ifneq ($(FILE),NO)
OBJS += ./File.o
-FLAGS += -DFILE_SUPPORT
endif
ifneq ($(NEX),NO)
OBJS += ./Nex.o
-FLAGS += -DNEX_SUPPORT
endif
ifneq ($(FTP),NO)
OBJS += ./FTP.o
-FLAGS += -DFTP_SUPPORT
endif
ifeq ($(WINDOWS),YES)
endif
./%.o: ./%.c W3%.h
- $(CC) $(CFLAGS) $(FLAGS) -I../openssl/include -c -o $@ $<
+ $(CC) $(CFLAGS) -I../openssl/include -c -o $@ $<
clean:
rm -f *.o *.so *.core *~ *.dll *.lib *.a *.res
include cache.mk
endif
+include ./Library/protocol.mk
+
ifeq ($(shell uname -s),SunOS)
GREP = ggrep
else
LIBS += -lssl -lcrypto
endif
+ifeq ($(SSL),YES)
+ifneq ($(GEMINI),NO)
+FLAGS += -DGEMINI_SUPPORT
+endif
+endif
+
+ifneq ($(HTTP),NO)
+FLAGS += -DHTTP_SUPPORT
+endif
+
+ifneq ($(GOPHER),NO)
+FLAGS += -DGOPHER_SUPPORT
+endif
+
+ifneq ($(POP3),NO)
+FLAGS += -DPOP3_SUPPORT
+endif
+
+ifneq ($(FINGER),NO)
+FLAGS += -DFINGER_SUPPORT
+endif
+
+ifneq ($(FILE),NO)
+FLAGS += -DFILE_SUPPORT
+endif
+
+ifneq ($(NEX),NO)
+FLAGS += -DNEX_SUPPORT
+endif
+
+ifneq ($(FTP),NO)
+FLAGS += -DFTP_SUPPORT
+endif
+
+CFLAGS += $(FLAGS)
+
ifeq ($(WIN32),YES)
CC := i686-w64-mingw32-gcc
WINDRES := i686-w64-mingw32-windres
./Example: ./Library/w3.dll
$(MAKE) -C ./Example CC=$(CC) TCL=$(TCL) TCL_LIBS="$(TCL_LIBS)" TCL_CFLAGS="$(TCL_CFLAGS)" examples SUFFIX=.exe
-./Library/W3Version.h:
- m4 -DSUFFIX=\"W\" ./W3Version.h.p > $@
+./Library/W3Version.h: ./W3Version.h.m4
+ m4 -DSUFFIX=\"W\" $(FLAGS) $< > $@
else
./Example: ./Library/libw3.so
$(MAKE) -C ./Example CC=$(CC) TCL_LIBS="$(TCL_LIBS)" TCL_CFLAGS="$(TCL_CFLAGS)" TCL=$(TCL) examples
-./Library/W3Version.h:
- m4 -DSUFFIX=\"\" ./W3Version.h.p > $@
+./Library/W3Version.h: ./W3Version.h.m4
+ m4 -DSUFFIX=\"\" $(FLAGS) $< > $@
endif
--- /dev/null
+/* $Id$ */
+#ifndef __W3VERSION_H__
+#define __W3VERSION_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define LIBW3_VERSION "2.13" \
+SUFFIX
+
+ifdef(`HTTP_SUPPORT', `#define LIBW3_HTTP_SUPPORT', `')
+ifdef(`FTP_SUPPORT', `#define LIBW3_FTP_SUPPORT', `')
+ifdef(`GOPHER_SUPPORT', `#define LIBW3_GOPHER_SUPPORT', `')
+ifdef(`GEMINI_SUPPORT', `#define LIBW3_GEMINI_SUPPORT', `')
+ifdef(`FINGER_SUPPORT', `#define LIBW3_FINGER_SUPPORT', `')
+ifdef(`NEX_SUPPORT', `#define LIBW3_NEX_SUPPORT', `')
+ifdef(`FILE_SUPPORT', `#define LIBW3_FILE_SUPPORT', `')
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+++ /dev/null
-/* $Id$ */
-#ifndef __W3VERSION_H__
-#define __W3VERSION_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define LIBW3_VERSION "2.13" \
-SUFFIX
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif