aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2017-11-12 14:44:35 +0100
committerMattias Andrée <maandree@kth.se>2017-11-12 14:54:29 +0100
commit67a395794b678d7da053c3daf61eb12d3f9437f2 (patch)
tree26be121e2738954a648d4032e8798723034960d7 /Makefile
parentMore functions and add makefile (diff)
downloadlibsimple-67a395794b678d7da053c3daf61eb12d3f9437f2.tar.gz
libsimple-67a395794b678d7da053c3daf61eb12d3f9437f2.tar.bz2
libsimple-67a395794b678d7da053c3daf61eb12d3f9437f2.tar.xz
Split into multiple units
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--Makefile62
1 files changed, 59 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 35e122e..bdaeb44 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,66 @@
.POSIX:
+CFLAGS = -std=c99 -Wall -Wextra -O2 $(CPPFLAGS)
+CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700
+LDFLAGS = -s
+
+OBJ =\
+ allocn.o\
+ asprintf.o\
+ difftimespec.o\
+ difftimeval.o\
+ doubletotimespec.o\
+ doubletotimeval.o\
+ encalloc.o\
+ enmalloc.o\
+ enmemdup.o\
+ enrealloc.o\
+ enstrdup.o\
+ enstrndup.o\
+ envmalloczn.o\
+ envputenvf.o\
+ envreallocn.o\
+ isutf8.o\
+ memdup.o\
+ memends.o\
+ memmem.o\
+ memrchr.o\
+ memstarts.o\
+ multimespec.o\
+ multimeval.o\
+ rawmemchr.o\
+ rawmemrchr.o\
+ rawmemrchr.o\
+ recvfd.o\
+ recvfrom_timestamped.o\
+ sendfd.o\
+ strcasestr.o\
+ strchrnul.o\
+ strends.o\
+ strndup.o\
+ strstarts.o\
+ strtotimespec.o\
+ strtotimeval.o\
+ sumtimespec.o\
+ sumtimeval.o\
+ timespec2timeval.o\
+ timespectostr.o\
+ timevaltostr.o\
+ vasprintf.o\
+ vputenvf.o\
+ vweprintf.o\
+ libsimple.o
+
all: libsimple.a
-libsimple.o: libsimple.h
-libsimple.a: libsimple.o
+$(OBJ): libsimple.h
+
+libsimple.a: $(OBJ)
+ $(AR) rc $@ $?
+ $(AR) -s $@
clean:
- -rm -r -- libsimple.o libsimple.a libsimple.so libsimple.so.*
+ -rm -r -- *.o libsimple.a libsimple.so libsimple.so.*
+
+.SUFFIXES: .c.o
.PHONY: all clean