diff --git a/Makefile b/Makefile index 8771305..a39977f 100644 --- a/Makefile +++ b/Makefile @@ -5,10 +5,19 @@ include Makefile_options_$(OS) SUBDIRS := core SUBDIRS += $(PACKAGES) -all: - @echo ">>> Try to compile Torch <<<" - @for subdir in ${SUBDIRS} ; do ( cd $$subdir ; ${MAKE} $@) || exit 10 ; done - @echo ">> !!! Ok !!! <<<" +.PHONY: subdirs $(SUBDIRS) + +core: $(PACKAGES) + +all: subdirs + +subdirs: $(SUBDIRS) + +$(SUBDIRS): + @\mkdir -p $(OBJS_DIR) + @\mkdir -p $(LIBS_DIR) + $(MAKE) -C $@ depend + $(MAKE) -C $@ clean: @echo ">>> Atomise all <<<" diff --git a/core/Makefile b/core/Makefile index 588d366..42b8a11 100644 --- a/core/Makefile +++ b/core/Makefile @@ -11,6 +11,7 @@ all: $(LIBTORCH) $(LIBTORCH): $(OBJS) @echo "Archiving..." @$(AR) $(LIBTORCH) $(OBJS) + @ranlib $(LIBTORCH) $(OBJS_DIR)/%.o: %.cc @echo $<