X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=Makefile;h=6fbca9cd1b4768df0f4f56fba333af73f29ae434;hb=HEAD;hp=f7e19fb8901d98dbfd90965f521b892bc45cdc0e;hpb=73d2280b56e07b3115c14deaa994114a462afd33;p=lopsub.git diff --git a/Makefile b/Makefile index f7e19fb..6fbca9c 100644 --- a/Makefile +++ b/Makefile @@ -28,6 +28,8 @@ INSTALL := install GZIP := gzip -fn9 ZCAT := zcat +CC += -ffile-prefix-map=$(CURDIR)=. + dummy != $(M4) /dev/null || printf 'failed' ifeq ($(dummy), failed) $(error m4 is required to build this package) @@ -97,6 +99,7 @@ lopsubex_objs := lopsubex.o lopsubex.lsg.o $(liblopsub_objs) LLS_CFLAGS := -g -fPIC STRICT_CFLAGS := -Wall +STRICT_CFLAGS += -Werror-implicit-function-declaration $(lsg_objs) $(liblopsub_objs) $(lopsubex_objs): %.o: %.c lopsubgen.o config_file.o: @@ -110,9 +113,13 @@ lsg1.o: lsg.c lsg.h lopsubgen-stage1: $(lsg1_objs) $(CC) -Wall -g $(lsg1_objs) -o $@ lopsubgen: $(lsg_objs) - $(CC) -Wall -g -o $@ $(lsg_objs) + $(CC) -Wall -g $(LDFLAGS) -o $@ $(lsg_objs) $(REALNAME): $(liblopsub_objs) - $(CC) --shared -Wl,-soname,liblopsub.so.$(MAJOR_VERSION) -o $@ $^ + $(CC) --shared -Wl,-soname,liblopsub.so.$(MAJOR_VERSION) \ + $(LDFLAGS) -o $@ $^ +liblopsub.a: $(liblopsub_objs) + $(AR) -rcs $@ $^ + lopsubex: $(lopsubex_objs) $(REALNAME) $(CC) -Wall -g -o $@ $(lopsubex_objs) @@ -148,4 +155,4 @@ clean: distclean: clean $(RM) *.lsg.c *.lsg.h lopsubgen.c config_file.c lopsubgen-stage1 \ lopsub.h lopsub.7 lopsub-suite.5 version.c - +-include Makefile.local