1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|
LIBNAME=fix!.so
LIBFILES = sigfix.o tcfix.o statfix.o dirfix.o
CFLAGS = -O2 -W -Wall -Wno-parentheses -Wno-unused -mtune=601 -mno-string
CFLAGS += -mmultiple -msdata=sysv -G9999
LDFLAGS = -G9999
CC=gcc
REQSYMS=__umoddi3 __udivdi3 __ashldi3 __divdi3 __lshrdi3 __moddi3
all: fixrelent fixrelent-static $(LIBNAME) $(LIBNAME)-old rename
elfload.o : elfload.c
fixrelent.o : fixrelent.c
fixrelent fixrelent-static : fixrelent.o elfload.o
fixbang : fixbang.c
$(LIBFILES) : %.o : %.c
$(COMPILE.c) -msdata=none -fpic $< $(OUTPUT_OPTION)
fixrelent-static :
$(LINK.o) -static $^ $(OUTPUT_OPTION)
rename : rename.o
$(LINK.o) -nostartfiles -static $^ $(OUTPUT_OPTION)
$(LIBNAME) : $(LIBFILES) setjmp.o fixbang v.map
$(LINK.o) -shared -Wl,--version-script=v.map $(filter %.o,$^) \
-Wl,-u,`echo $(REQSYMS) | sed 's/ /,-u,/g'` \
-Wl,-soname=$@ -o $@.T
./fixbang $@.T
mv $@.T $@
$(LIBNAME)-old : nofix.o fixbang v.map
$(LINK.o) -shared -Wl,--version-script=v.map $(filter %.o,$^) \
-Wl,-soname=$@ -o $@.T
./fixbang $@.T
mv $@.T $@
clean:
rm -f *.o fixbang
rm -f fixrelent fixrelent-static $(LIBNAME) $(LIBNAME)-old rename
install: $(LIBNAME) fixrelent rename
install -s $(LIBNAME) $(DESTDIR)/lib
install -s rename $(DESTDIR)/usr/bin/rename
install -s fixrelent $(DESTDIR)/usr/bin/fix961212
install-old: $(LIBNAME) $(LIBNAME)-old fixrelent-static rename
install -s $(LIBNAME)-old $(DESTDIR)/lib/
install -s $(LIBNAME) $(DESTDIR)/lib/$(LIBNAME)-new
install -s fixrelent-static $(DESTDIR)/usr/bin/fix961212
install -s rename $(DESTDIR)/usr/bin/rename
ln -s $(LIBNAME)-new $(DESTDIR)/lib/$(LIBNAME)
|