blob: 02193c310bc4e33fc50bc308ff01353f830894e4 (
plain)
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
|
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 $<
|