* More fixes on build system

- 'make mrproper' now works like 'hg purge --all'
  - More fixes on 'make clean'
  - Remove some missing -Wl,-R
This commit is contained in:
Nibble 2010-06-15 14:10:42 +02:00
parent 19dfb38b23
commit 414f5a38bc
19 changed files with 71 additions and 28 deletions

View File

@ -25,11 +25,14 @@ w32dist:
clean:
cd libr && ${MAKE} clean
cd binr && ${MAKE} clean
cd r2rc && ${MAKE} clean
mrproper:
cd libr && ${MAKE} mrproper
cd binr && ${MAKE} mrproper
rm -f plugins.cfg libr/config.h libr/config.mk
cd r2rc && ${MAKE} mrproper
rm -f config-user.mk plugins.cfg libr/config.h libr/include/r_userconf.h libr/config.mk
rm -f pkgcfg/*.pc
pkgcfg:
cd libr && ${MAKE} pkgcfg
@ -57,13 +60,6 @@ deinstall: uninstall
cd libr && ${MAKE} uninstall PARENT=1 PREFIX=${PREFIX} DESTDIR=${DESTDIR}
cd binr && ${MAKE} uninstall PARENT=1 PREFIX=${PREFIX} DESTDIR=${DESTDIR}
cd r2rc && ${MAKE} uninstall PARENT=1 PREFIX=${PREFIX} DESTDIR=${DESTDIR}
# MOVE TO libr/Makefile, use for a in LIBS...
rm -rf ${DESTDIR}${PREFIX}/include/libr
rm -rf ${DESTDIR}${PREFIX}/lib/libr_*.so
rm -rf ${DESTDIR}${PREFIX}/lib/libr_*.a
rm -rf ${DESTDIR}${PREFIX}/lib/libr.so
rm -rf ${DESTDIR}${PREFIX}/lib/libr.a
rm -rf ${DESTDIR}${PREFIX}/share/doc/radare2
swig-dist:
cd swig && ${MAKE} dist

View File

@ -24,7 +24,5 @@ deinstall uninstall:
for a in ${BINS} ; do rm -f ${PFX}/bin/$$a ; done
-rm -f ${PFX}/bin/r2
mrproper:clean
clean:
clean mrproper:
@for a in ${BINS} ; do (cd $$a && ${MAKE} clean); done

View File

@ -118,13 +118,22 @@ deinstall uninstall:
rm -f ${PFX}/lib/pkgconfig/r_*.pc
# test programs
rm -rf ${PFX}/bin/libr-test
# TODO: use for a in LIBLIST (like in binr/Makefile)
rm -rf ${PFX}/include/libr
rm -rf ${PFX}/lib/libr_*.so
rm -rf ${PFX}/lib/libr_*.a
rm -rf ${PFX}/lib/libr.so
rm -rf ${PFX}/lib/libr.a
rm -rf ${PFX}/share/doc/radare2
@echo libr aka radare2 has been uninstalled from PREFIX=${PFX}
clean:
for lib in ${LIBLIST}; do ( cd $${lib} && ${MAKE} clean ); done
rm -f libr2.so
rm -rf .objs
mrproper: clean
for lib in ${LIBLIST}; do ( cd $${lib} && ${MAKE} mrproper ); done
rm -f libr.pc
sloc:

View File

@ -16,4 +16,7 @@ all: ${ALL_TARGETS}
clean:
-rm -f *.${EXT_SO} *.o ${STATIC_OBJ}
.PHONY: all clean foo
mrproper: clean
-rm -f *.d ../arch/*/*/*.d
.PHONY: all clean foo mrproper

View File

@ -22,4 +22,7 @@ a:
clean:
-rm -f *.${EXT_SO} *.o ${STATIC_OBJ}
.PHONY: all clean foo
mrproper: clean
-rm -f *.d ../arch/*/*/*.d
.PHONY: all clean foo mrproper

View File

@ -18,4 +18,7 @@ all: ${ALL_TARGETS}
clean:
-rm -f *.so *.o ${STATIC_OBJ}
.PHONY: all clean foo
mrproper: clean
-rm -f *.d ../format/*/*.d
.PHONY: all clean foo mrproper

View File

@ -15,4 +15,7 @@ all: ${ALL_TARGETS}
clean:
-rm -f *.so *.o ${STATIC_OBJ}
.PHONY: all clean foo
mrproper: clean
-rm -f *.d
.PHONY: all clean foo mrproper

View File

@ -17,4 +17,7 @@ all: ${ALL_TARGETS}
clean:
-rm -f *.${EXT_SO} *.o ${STATIC_OBJ}
.PHONY: all clean foo
mrproper: clean
-rm -f *.d
.PHONY: all clean foo mrproper

View File

@ -14,4 +14,7 @@ all: ${ALL_TARGETS}
clean:
-rm -f *.${EXT_SO} *.o ${STATIC_OBJ}
.PHONY: all clean foo
mrproper: clean
-rm -f *.d
.PHONY: all clean foo mrproper

View File

@ -18,4 +18,7 @@ pre:
clean:
-rm -f *.${EXT_SO} *.o ${STATIC_OBJ}
.PHONY: all clean
mrproper: clean
-rm -f *.d */*.d
.PHONY: all clean foo mrproper

View File

@ -20,3 +20,8 @@ io_ewf.${LIB_SO}: io_ewf.o
clean:
-rm -f *.so *.o *.dll *.dylib *.${EXT_SO}
mrproper: clean
-rm -f *.d
.PHONY: all clean foo mrproper

View File

@ -23,3 +23,6 @@ read4${EXT_EXE}: read4.o
clean:
rm -f cat read4 map *.o
mrproper: clean
-rm -f *.d

View File

@ -18,4 +18,7 @@ all: ${ALL_TARGETS}
clean:
-rm -f *.${EXT_SO} *.o ${STATIC_OBJ}
.PHONY: all clean foo
mrproper: clean
-rm -f *.d */*.d
.PHONY: all clean foo mrproper

View File

@ -62,8 +62,14 @@ deinstall uninstall:
clean: ${EXTRA_CLEAN}
-rm -f *.${EXT_EXE} *.${EXT_SO} *.${EXT_AR}
-rm -f ${LIBSO} ${LIBAR} ${OBJ} ${BIN} *.exe a.out
@if [ -e t/Makefile ]; then (cd t && ${MAKE} clean) ; fi
@if [ -e p/Makefile ]; then (cd p && ${MAKE} clean) ; fi
-@if [ -e t/Makefile ]; then (cd t && ${MAKE} clean) ; fi
-@if [ -e p/Makefile ]; then (cd p && ${MAKE} clean) ; fi
@true
mrproper: clean
-@if [ -e t/Makefile ]; then (cd t && ${MAKE} mrproper) ; fi
-@if [ -e p/Makefile ]; then (cd p && ${MAKE} mrproper) ; fi
-rm -f *.d
@true
sloc:
@ -102,6 +108,9 @@ myclean:
clean: myclean
-rm -f ${OBJ} ${BIN}
mrproper: clean
-rm -f *.d
install:
cd ../.. && ${MAKE} install

View File

@ -6,6 +6,7 @@ PIC_CFLAGS=-fPIC
CFLAGS+=-MD
CFLAGS_INCLUDE=-I
LDFLAGS_LINK=-l
LDFLAGS_LINKPATH=-L
CFLAGS_OPT0=-O0
CFLAGS_OPT1=-O1
CFLAGS_OPT2=-O2
@ -14,11 +15,9 @@ CFLAGS_DEBUG=-g
ifeq ($(OSTYPE),darwin)
LDFLAGS_LIB=-dynamiclib
LDFLAGS_LINKPATH=-L
LDFLAGS_SONAME=-Wl,-install_name,
else
LDFLAGS_LIB=-shared
LDFLAGS_LINKPATH=-Wl,-R
LDFLAGS_SONAME=-Wl,-soname=
endif

View File

@ -8,7 +8,7 @@ CFLAGS+=${PICFLAGS} -MD -D__WINDOWS__=1
CC_LIB=${CC} -shared -o
CFLAGS_INCLUDE=-I
LDFLAGS_LINK=-l
LDFLAGS_LINKPATH=-Wl,-R
LDFLAGS_LINKPATH=-L
CFLAGS_OPT0=-O0
CFLAGS_OPT1=-O1
CFLAGS_OPT2=-O2

View File

@ -8,7 +8,7 @@ CFLAGS+=${PICFLAGS} -MD -D__WINDOWS__=1
CC_LIB=${CC} -shared -o
CFLAGS_INCLUDE=-I
LDFLAGS_LINK=-l
LDFLAGS_LINKPATH=-Wl,-R
LDFLAGS_LINKPATH=-L
CFLAGS_OPT0=-O0
CFLAGS_OPT1=-O1
CFLAGS_OPT2=-O2

View File

@ -6,7 +6,7 @@ PIC_CFLAGS+=-fPIC
CC_LIB=${CC} -shared -o ${LIBSO}
CFLAGS_INCLUDE=-I
LDFLAGS_LINK=-l
LDFLAGS_LINKPATH=-Wl,-R
LDFLAGS_LINKPATH=-L
CFLAGS_OPT0=-O0
CFLAGS_OPT1=-O1
CFLAGS_OPT2=-O2

View File

@ -31,9 +31,9 @@ install-symlink:
deinstall uninstall:
rm -f ${PFX}/bin/r2rc ${PFX}/bin/r2rc-tool
clean:
clean mrproper:
cd t && ${MAKE} clean
-rm -f r2rc r2rc.o out.o emit*.o
.PHONY: all clean install install-symlink deinstall uninstall r2rc test
.PHONY: all clean install install-symlink deinstall uninstall r2rc test mrproper