From 18d58a5892c509f99406a2747fe86ded1135d04c Mon Sep 17 00:00:00 2001 From: Glen Wiley Date: Mon, 15 Jul 2013 18:20:25 -0400 Subject: [PATCH] using suffixes in Makefile, moved changed files from src to common (merged) --- src/{src => }/Doxyfile | 0 src/common/Makefile | 12 +++++++----- src/common/Makefile.in | 12 +++++++----- src/{src => common}/getdns_context.c | 0 src/{src/getdns_core_sync.c => common/getdns_sync.c} | 0 5 files changed, 14 insertions(+), 10 deletions(-) rename src/{src => }/Doxyfile (100%) rename src/{src => common}/getdns_context.c (100%) rename src/{src/getdns_core_sync.c => common/getdns_sync.c} (100%) diff --git a/src/src/Doxyfile b/src/Doxyfile similarity index 100% rename from src/src/Doxyfile rename to src/Doxyfile diff --git a/src/common/Makefile b/src/common/Makefile index 5ca8cc08..65569d68 100644 --- a/src/common/Makefile +++ b/src/common/Makefile @@ -15,17 +15,19 @@ srcdir = . CC=gcc -CFLAGS=-g -I$(srcdir)/ -std=c99 +CFLAGS=-Wall -g -fPIC -I$(srcdir)/ -std=c99 LDFLAGS=-L. LDLIBS=-levent_core -lldns -lgetdns PROGRAMS=example-simple-answers example-tree example-all-functions example-synchronous +.SUFFIXES: .c .o .a .lo .h + +.c.o: + $(CC) $(CFLAGS) -c $< -o $@ + all: libgetdns example-simple-answers example-tree example-all-functions example-synchronous -getdns_core_only.o: getdns_core_only.c - $(CC) -c -Wall -fPIC $(CFLAGS) $^ - -libgetdns: getdns_core_only.c +libgetdns: getdns_core_only.o getdns_sync.o getdns_context.o $(CC) $(CFLAGS) -shared -o libgetdns.so $^ clean: diff --git a/src/common/Makefile.in b/src/common/Makefile.in index 1a822bcd..4c3736dc 100644 --- a/src/common/Makefile.in +++ b/src/common/Makefile.in @@ -15,17 +15,19 @@ srcdir = @srcdir@ VPATH = @srcdir@ CC=gcc -CFLAGS=-g -I$(srcdir)/ -std=c99 +CFLAGS=-Wall -g -fPIC -I$(srcdir)/ -std=c99 LDFLAGS=-L. LDLIBS=-levent_core -lldns -lgetdns PROGRAMS=example-simple-answers example-tree example-all-functions example-synchronous +.SUFFIXES: .c .o .a .lo .h + +.c.o: + $(CC) $(CFLAGS) -c $< -o $@ + all: libgetdns example-simple-answers example-tree example-all-functions example-synchronous -getdns_core_only.o: getdns_core_only.c - $(CC) -c -Wall -fPIC $(CFLAGS) $^ - -libgetdns: getdns_core_only.c +libgetdns: getdns_core_only.o getdns_sync.o getdns_context.o $(CC) $(CFLAGS) -shared -o libgetdns.so $^ clean: diff --git a/src/src/getdns_context.c b/src/common/getdns_context.c similarity index 100% rename from src/src/getdns_context.c rename to src/common/getdns_context.c diff --git a/src/src/getdns_core_sync.c b/src/common/getdns_sync.c similarity index 100% rename from src/src/getdns_core_sync.c rename to src/common/getdns_sync.c