]> git.llucax.com Git - z.facultad/75.52/treemulator.git/blobdiff - src/Makefile
Bugfix : Condición base para cortar la recursividad.
[z.facultad/75.52/treemulator.git] / src / Makefile
index 0db8bd1f8c5d90a604832877627cc90b228a626f..2bcafd625ba327d23a9cd1d82f31765491e13282 100644 (file)
@@ -1,12 +1,20 @@
-TARGET=btree
+TARGETS=btree btree_variable libbtree.a
 CXXFLAGS=-Wall -g
 
-all: $(TARGET)
+BTREE_COMMON=btree.o clave_fija.o btree_data.o clave_variable.o
 
-$(TARGET): main.o btree.o clave_fija.o btree_data.o
-       g++ -o $(TARGET) main.o btree.o clave_fija.o btree_data.o
+all: $(TARGETS)
+
+btree: main.o $(BTREE_COMMON)
+       g++ -o btree main.o $(BTREE_COMMON)
+
+btree_variable: main_variable.o $(BTREE_COMMON)
+       g++ -o btree_variable main_variable.o $(BTREE_COMMON)
+
+libbtree.a: $(BTREE_COMMON)
+       $(AR) cru libbtree.a $(BTREE_COMMON)
 
 clean:
-       rm -rf *.o $(TARGET)
+       rm -rf *.o $(TARGETS)