]> git.tuebingen.mpg.de Git - lopsub.git/blobdiff - Makefile
lopsub-1.0.5
[lopsub.git] / Makefile
index 548c96ff0e6298e29d8f247940a4f446e6757d35..6fbca9cd1b4768df0f4f56fba333af73f29ae434 100644 (file)
--- 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)
@@ -111,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)
 
@@ -149,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