$(CC) -o $@ -I ../Library -L ../Library $< -lw3
clean:
- rm -f fetch *.o *.so *.core
+ rm -f fetch *.o *.so *.core *~
install: ./fetch
mkdir -p $(PREFIX)/bin
$(CC) $(CFLAGS) -c -o $@ $<
clean:
- rm -f *.o *.so *.core
+ rm -f *.o *.so *.core *~
install: ./libw3.so
mkdir -p $(PREFIX)/lib
fprintf(stderr, "%s%s %s\n", title, periods, message);
#endif
}
+
+char* __W3_Concat(const char* str1, const char* str2){
+ char* str = malloc(strlen(str1) + strlen(str2) + 1);
+ strcpy(str, str1);
+ strcpy(str + strlen(str1), str2);
+ str[strlen(str1) + strlen(str2)] = 0;
+ return str;
+}
#define __W3UTIL_H__
void __W3_Debug(const char* title, const char* message);
+char* __W3_Concat(const char* str1, const char* str2);
#endif
include config.mk
CC := cc
-CFLAGS := -g -std=c99 -fPIC -D_BSD_SOURCE
+CFLAGS := -g -std=c99 -fPIC -D_BSD_SOURCE $(DEBUG)
LDFLAGS :=
LIBS :=
PREFIX := /usr/local
LIBS += -lssl -lcrypto
endif
-ifdef DEBUG
-CFLAGS += -D__DEBUG__
-endif
-
.PHONY: all clean ./Library/libw3.so ./Example/fetch
all: ./w3.pc ./Library/libw3.so ./Example/fetch
echo "Libs: -I\$${libdir} -lw3" >> $@
clean:
- rm ./w3.pc
+ -rm ./w3.pc
$(MAKE) -C ./Library clean
$(MAKE) -C ./Example clean