From 5a2e4dec99f4004aeeeb4042da2e901da4fedce6 Mon Sep 17 00:00:00 2001 From: NiLuJe Date: Wed, 3 Oct 2012 13:56:36 +0200 Subject: [PATCH] Fix the luajit clean fix (forgot to quote *_*). Let ld do its job when linking, don't pass the static libs as object files (we end up with a smaller native binary). --- Makefile | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index a386ea8d0..474ed55b0 100644 --- a/Makefile +++ b/Makefile @@ -112,21 +112,32 @@ kpdfview: kpdfview.o einkfb.o pdf.o blitbuffer.o drawcontext.o input.o $(POPENNS blitbuffer.o \ drawcontext.o \ input.o \ - $(POPENNSLIB) \ util.o \ ft.o \ lfs.o \ mupdfimg.o \ - $(MUPDFLIBS) \ - $(THIRDPARTYLIBS) \ - $(LUALIB) \ djvu.o \ - $(DJVULIBS) \ cre.o \ - $(CRENGINELIBS) \ $(STATICLIBSTDCPP) \ $(LDFLAGS) \ - -o $@ -lm -ldl -lpthread $(EMU_LDFLAGS) $(DYNAMICLIBSTDCPP) + -L$(POPENNSDIR) \ + -L$(MUPDFLIBDIR) \ + -L$(DJVUDIR)/build/libdjvu/.libs \ + -L$(LUADIR)/src \ + -L$(CRENGINEDIR)/crengine \ + -L$(CRENGINEDIR)/thirdparty/chmlib \ + -L$(CRENGINEDIR)/thirdparty/libpng \ + -L$(CRENGINEDIR)/thirdparty/antiword \ + -L$(MUPDFLIBDIR) \ + -o $@ \ + -lm -ldl -lpthread \ + -lpopen_noshell \ + -lfitz -lfreetype -lopenjpeg -ljbig2dec -ljpeg -lz \ + -lluajit \ + -ldjvulibre \ + -lcrengine -lchmlib -lpng -lantiword \ + $(EMU_LDFLAGS) \ + $(DYNAMICLIBSTDCPP) slider_watcher.o: %.o: %.c $(CC) -c $(CFLAGS) $< -o $@ @@ -184,7 +195,7 @@ clean: rm -f *.o kpdfview slider_watcher cleanthirdparty: - $(MAKE) -C $(LUADIR) CC=$(HOSTCC) CFLAGS=$(BASE_CFLAGS) distclean + $(MAKE) -C $(LUADIR) CC=$(HOSTCC) CFLAGS="$(BASE_CFLAGS)" distclean $(MAKE) -C $(MUPDFDIR) build="release" clean $(MAKE) -C $(CRENGINEDIR)/thirdparty/antiword clean test -d $(CRENGINEDIR)/thirdparty/chmlib && $(MAKE) -C $(CRENGINEDIR)/thirdparty/chmlib clean || echo warn: chmlib folder not found