]> pd.if.org Git - pdclib/commitdiff
Added Makefile and moved internal headers into seperate directory (allowing easier...
authorsolar <unknown>
Sun, 20 Nov 2005 13:04:16 +0000 (13:04 +0000)
committersolar <unknown>
Sun, 20 Nov 2005 13:04:16 +0000 (13:04 +0000)
Makefile [new file with mode: 0644]
functions/string/memcpy.c
functions/string/strncat.c
functions/string/strncpy.c
functions/string/strtok.c
functions/string/strxfrm.c
internals/_PDCLIB_aux.h [moved from includes/_PDCLIB_aux.h with 100% similarity]
internals/_PDCLIB_config.h [moved from includes/_PDCLIB_config.h with 100% similarity]
internals/_PDCLIB_int.h [moved from includes/_PDCLIB_int.h with 100% similarity]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..9358097
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,28 @@
+# This is a list of all non-source files that are part of the distribution.
+AUXFILES := Makefile Readme.txt
+
+SRCFILES := $(shell find . -name "*.c" -mindepth 1 -maxdepth 3)
+HDRFILES := $(shell find . -name "*.h" -mindepth 1 -maxdepth 3)
+OBJFILES := $(patsubst %.c,%.o,$(SRCFILES))
+DEPFILES := $(patsubst %.c,%.d,$(SRCFILES))
+ALLFILES := $(SRCFILES) $(HDRFILES) $(AUXFILES)
+
+CPPFLAGS  := -MMD -MP
+CFLAGS    := -g -std=c99 -I./internals/
+
+.PHONY: all clean dist
+
+all: $(OBJFILES)
+       ar r pdclib.a $(OBJFILES)
+
+-include $(DEPFILES)
+
+clean:
+       -@for file in $(OBJFILES) $(DEPFILES) pdclib.a; do if [ -f $$file ]; then rm $$file; fi; done
+
+dist:
+       @tar czf pdclib.tgz $(ALLFILES)
+
+%.o: %.c Makefile
+       $(CC) $(MODE) -c $(CPPFLAGS) $(CFLAGS) $< -o $@
+
index 785b1cd4088d9098e681d0a50e6f263bf2509b59..a5842d33dcb981b4bb2772c457009a443f5ec423 100644 (file)
@@ -8,6 +8,7 @@
    Permission is granted to use, modify, and / or redistribute at will.
 */
 
+#include <_PDCLIB_aux.h>
 #include <string.h>
 
 void * memcpy( void * _PDCLIB_restrict s1, const void * _PDCLIB_restrict s2, size_t n )
index b33fb7cf39b1f2665816bcbe36929c458aa12405..44dcb402614b0e7ff397f7a20b9f3922e075d340 100644 (file)
@@ -8,6 +8,7 @@
    Permission is granted to use, modify, and / or redistribute at will.
 */
 
+#include <_PDCLIB_aux.h>
 #include <string.h>
 
 char * strncat( char * _PDCLIB_restrict s1, const char * _PDCLIB_restrict s2, size_t n )
index aafb7040a79c958683b2553aef54bcd1fc5968eb..ed5965d148ddbd5236288cbc521d39423911db0c 100644 (file)
@@ -8,6 +8,7 @@
    Permission is granted to use, modify, and / or redistribute at will.
 */
 
+#include <_PDCLIB_aux.h>
 #include <string.h>
 
 char * strncpy( char * _PDCLIB_restrict s1, const char * _PDCLIB_restrict s2, size_t n )
index 4d371afe29b0a6f392f4d5540b65a09e74c58e05..31359208d1d4b9342d99fe6452742d6043fd135d 100644 (file)
@@ -8,6 +8,7 @@
    Permission is granted to use, modify, and / or redistribute at will.
 */
 
+#include <_PDCLIB_aux.h>
 #include <string.h>
 
 char * strtok( char * _PDCLIB_restrict s1, const char * _PDCLIB_restrict s2 )
index 578eb4ba7a5c536b3c129bc434391c0024cbcee9..5849a0cb80ea52a44883c0ed1d7837125f97340a 100644 (file)
@@ -8,6 +8,7 @@
    Permission is granted to use, modify, and / or redistribute at will.
 */
 
+#include <_PDCLIB_aux.h>
 #include <string.h>
 
 /* TODO: Dummy function, no locale support yet. */