diff options
-rw-r--r-- | Makefile | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/Makefile b/Makefile index e0e1989..b82361b 100644 --- a/Makefile +++ b/Makefile @@ -48,7 +48,6 @@ else CFLAGS_SHARED := endif LDFLAGS_ALL := $(LDFLAGS_AUTO) $(LDFLAGS) -REALCC = $(CROSS_COMPILE)$(CC) AR := $(CROSS_COMPILE)ar RANLIB := $(CROSS_COMPILE)ranlib STRIP := $(CROSS_COMPILE)strip @@ -58,7 +57,7 @@ ALL_BINS := $(LIBEXEC_TARGETS) $(BIN_TARGETS) ALL_LIBS := $(SHARED_LIBS) $(STATIC_LIBS) $(INTERNAL_LIBS) ALL_INCLUDES := $(wildcard src/include/$(package)/*.h) -all: $(ALL_LIBS) $(ALL_BINS) $(ALL_INCLUDES) +all: $(ALL_LIBS) $(ALL_BINS) $(ALL_INCLUDES) $(EXTRA_INCLUDES) clean: @exec rm -f $(ALL_LIBS) $(ALL_BINS) $(wildcard src/*/*.o src/*/*.lo) $(EXTRA_TARGETS) @@ -87,8 +86,7 @@ install-dynlib: $(SHARED_LIBS:lib%.so.xyzzy=$(DESTDIR)$(dynlibdir)/lib%.so) install-libexec: $(LIBEXEC_TARGETS:%=$(DESTDIR)$(libexecdir)/%) install-bin: $(BIN_TARGETS:%=$(DESTDIR)$(bindir)/%) install-lib: $(STATIC_LIBS:lib%.a.xyzzy=$(DESTDIR)$(libdir)/lib%.a) -install-include: $(ALL_INCLUDES:src/include/$(package)/%.h=$(DESTDIR)$(includedir)/$(package)/%.h) -install-data: $(ALL_DATA:src/etc/%=$(DESTDIR)$(datadir)/%) +install-include: $(ALL_INCLUDES:src/include/$(package)/%.h=$(DESTDIR)$(includedir)/$(package)/%.h) $(EXTRA_INCLUDES:src/include/%.h=$(DESTDIR)$(includedir)/%.h) ifneq ($(exthome),) @@ -109,9 +107,6 @@ $(DESTDIR)$(sproot)/library.so/lib%.so.$(version_M): $(DESTDIR)$(dynlibdir)/lib% endif -$(DESTDIR)$(datadir)/%: src/etc/% - exec $(INSTALL) -D -m 644 $< $@ - $(DESTDIR)$(dynlibdir)/lib%.so $(DESTDIR)$(dynlibdir)/lib%.so.$(version_M): lib%.so.xyzzy $(INSTALL) -D -m 755 $< $@.$(version) && \ $(INSTALL) -l $(@F).$(version) $@.$(version_M) && \ @@ -129,22 +124,25 @@ $(DESTDIR)$(libdir)/lib%.a: lib%.a.xyzzy $(DESTDIR)$(includedir)/$(package)/%.h: src/include/$(package)/%.h exec $(INSTALL) -D -m 644 $< $@ +$(DESTDIR)$(includedir)/%.h: src/include/%.h + exec $(INSTALL) -D -m 644 $< $@ + %.o: %.c - exec $(REALCC) $(CPPFLAGS_ALL) $(CFLAGS_ALL) -c -o $@ $< + exec $(CC) $(CPPFLAGS_ALL) $(CFLAGS_ALL) -c -o $@ $< %.lo: %.c - exec $(REALCC) $(CPPFLAGS_ALL) $(CFLAGS_ALL) $(CFLAGS_SHARED) -c -o $@ $< + exec $(CC) $(CPPFLAGS_ALL) $(CFLAGS_ALL) $(CFLAGS_SHARED) -c -o $@ $< $(ALL_BINS): - exec $(REALCC) -o $@ $(CFLAGS_ALL) $(LDFLAGS_ALL) $(LDFLAGS_NOSHARED) $^ $(EXTRA_LIBS) $(LDLIBS) + exec $(CC) -o $@ $(CFLAGS_ALL) $(LDFLAGS_ALL) $(LDFLAGS_NOSHARED) $^ $(EXTRA_LIBS) $(LDLIBS) lib%.a.xyzzy: exec $(AR) rc $@ $^ exec $(RANLIB) $@ lib%.so.xyzzy: - exec $(REALCC) -o $@ $(CFLAGS_ALL) $(CFLAGS_SHARED) $(LDFLAGS_ALL) $(LDFLAGS_SHARED) -Wl,-soname,$(patsubst lib%.so.xyzzy,lib%.so.$(version_M),$@) $^ $(EXTRA_LIBS) $(LDLIBS) + exec $(CC) -o $@ $(CFLAGS_ALL) $(CFLAGS_SHARED) $(LDFLAGS_ALL) $(LDFLAGS_SHARED) -Wl,-soname,$(patsubst lib%.so.xyzzy,lib%.so.$(version_M),$@) $^ $(EXTRA_LIBS) $(LDLIBS) -.PHONY: it all clean distclean tgz strip install install-dynlib install-bin install-lib install-include install-data +.PHONY: it all clean distclean tgz strip install install-dynlib install-bin install-lib install-include .DELETE_ON_ERROR: |