diff --git a/examples/Makefile b/examples/Makefile index a672dc4..10ba9f1 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -19,13 +19,12 @@ LDFLAGS += $(pkg-config --libs glib-2.0) all: dns base64 base64_sem1 base64_sem2 dns: LDFLAGS:=-L../src -lhammer $(LDFLAGS) -dns: dns.o rr.o dns_common.o glue.o +dns: dns.o rr.o dns_common.o $(call hush, "Linking $@") $(CC) -o $@ $^ $(LDFLAGS) dns.o: ../src/hammer.h dns_common.h rr.o: ../src/hammer.h rr.h dns_common.h dns_common.o: ../src/hammer.h dns_common.h -glue.o: ../src/hammer.h glue.h base64%: LDFLAGS:=-L../src -lhammer $(LDFLAGS) base64%: base64%.o diff --git a/examples/dns_common.h b/examples/dns_common.h index 6b04519..c1d8d7e 100644 --- a/examples/dns_common.h +++ b/examples/dns_common.h @@ -2,7 +2,7 @@ #define HAMMER_DNS_COMMON__H #include "../src/hammer.h" -#include "glue.h" +#include "../src/glue.h" const HParser* init_domain(); const HParser* init_character_string(); diff --git a/src/Makefile b/src/Makefile index 47e136d..ead0516 100644 --- a/src/Makefile +++ b/src/Makefile @@ -38,6 +38,7 @@ HAMMER_PARTS := \ system_allocator.o \ benchmark.o \ compile.o \ + glue.o \ $(PARSERS:%=parsers/%.o) \ $(BACKENDS:%=backends/%.o) @@ -67,6 +68,7 @@ libhammer.a: $(HAMMER_PARTS) bitreader.o: test_suite.h hammer.o: hammer.h +glue.o: hammer.h glue.h all: libhammer.a diff --git a/examples/glue.c b/src/glue.c similarity index 100% rename from examples/glue.c rename to src/glue.c diff --git a/examples/glue.h b/src/glue.h similarity index 99% rename from examples/glue.h rename to src/glue.h index ccb488e..90944ea 100644 --- a/examples/glue.h +++ b/src/glue.h @@ -21,11 +21,11 @@ // See the leading comment blocks on the sections below for more details. // -#ifndef HAMMER_EXAMPLES_GLUE__H -#define HAMMER_EXAMPLES_GLUE__H +#ifndef HAMMER_GLUE__H +#define HAMMER_GLUE__H #include -#include "../src/hammer.h" +#include "hammer.h" //