ucx/Makefile

changeset 1158
96c202d45fbb
parent 845
f3ab28ed22e5
--- a/ucx/Makefile	Mon Jun 01 20:29:26 2026 +0200
+++ b/ucx/Makefile	Tue Jun 02 19:30:34 2026 +0200
@@ -64,6 +64,84 @@
 ../build/ucx:
 	mkdir -p ../build/ucx
 
-../build/ucx/%$(OBJ_EXT): %.c
-	$(CC) $(CFLAGS) $(SHLIB_CFLAGS) -o $@ -c $<
+FORCE:
+
+../build/ucx/allocator$(OBJ_EXT): allocator.c cx/allocator.h cx/common.h
+	$(CC) -o $@ $(CFLAGS) $(SHLIB_CFLAGS) -c $<
+
+../build/ucx/array_list$(OBJ_EXT): array_list.c cx/array_list.h cx/list.h \
+ cx/common.h cx/collection.h cx/allocator.h cx/iterator.h cx/compare.h \
+ cx/compare.h
+	$(CC) -o $@ $(CFLAGS) $(SHLIB_CFLAGS) -c $<
+
+../build/ucx/buffer$(OBJ_EXT): buffer.c cx/buffer.h cx/common.h \
+ cx/allocator.h cx/string.h
+	$(CC) -o $@ $(CFLAGS) $(SHLIB_CFLAGS) -c $<
+
+../build/ucx/compare$(OBJ_EXT): compare.c cx/compare.h cx/common.h
+	$(CC) -o $@ $(CFLAGS) $(SHLIB_CFLAGS) -c $<
+
+../build/ucx/hash_key$(OBJ_EXT): hash_key.c cx/hash_key.h cx/common.h \
+ cx/string.h cx/allocator.h cx/compare.h
+	$(CC) -o $@ $(CFLAGS) $(SHLIB_CFLAGS) -c $<
+
+../build/ucx/hash_map$(OBJ_EXT): hash_map.c cx/hash_map.h cx/map.h \
+ cx/common.h cx/collection.h cx/allocator.h cx/iterator.h cx/compare.h \
+ cx/string.h cx/hash_key.h
+	$(CC) -o $@ $(CFLAGS) $(SHLIB_CFLAGS) -c $<
+
+../build/ucx/iterator$(OBJ_EXT): iterator.c cx/iterator.h cx/common.h
+	$(CC) -o $@ $(CFLAGS) $(SHLIB_CFLAGS) -c $<
+
+../build/ucx/json$(OBJ_EXT): json.c cx/json.h cx/common.h cx/allocator.h \
+ cx/string.h cx/buffer.h cx/array_list.h cx/list.h cx/collection.h \
+ cx/iterator.h cx/compare.h cx/map.h cx/hash_key.h cx/kv_list.h
+	$(CC) -o $@ $(CFLAGS) $(SHLIB_CFLAGS) -c $<
+
+../build/ucx/kv_list$(OBJ_EXT): kv_list.c cx/kv_list.h cx/common.h \
+ cx/list.h cx/collection.h cx/allocator.h cx/iterator.h cx/compare.h \
+ cx/map.h cx/string.h cx/hash_key.h cx/hash_map.h cx/linked_list.h
+	$(CC) -o $@ $(CFLAGS) $(SHLIB_CFLAGS) -c $<
 
+../build/ucx/linked_list$(OBJ_EXT): linked_list.c cx/linked_list.h \
+ cx/common.h cx/list.h cx/collection.h cx/allocator.h cx/iterator.h \
+ cx/compare.h cx/compare.h
+	$(CC) -o $@ $(CFLAGS) $(SHLIB_CFLAGS) -c $<
+
+../build/ucx/list$(OBJ_EXT): list.c cx/list.h cx/common.h cx/collection.h \
+ cx/allocator.h cx/iterator.h cx/compare.h
+	$(CC) -o $@ $(CFLAGS) $(SHLIB_CFLAGS) -c $<
+
+../build/ucx/map$(OBJ_EXT): map.c cx/map.h cx/common.h cx/collection.h \
+ cx/allocator.h cx/iterator.h cx/compare.h cx/string.h cx/hash_key.h \
+ cx/list.h
+	$(CC) -o $@ $(CFLAGS) $(SHLIB_CFLAGS) -c $<
+
+../build/ucx/mempool$(OBJ_EXT): mempool.c cx/mempool.h cx/common.h \
+ cx/allocator.h
+	$(CC) -o $@ $(CFLAGS) $(SHLIB_CFLAGS) -c $<
+
+../build/ucx/printf$(OBJ_EXT): printf.c cx/printf.h cx/common.h \
+ cx/string.h cx/allocator.h
+	$(CC) -o $@ $(CFLAGS) $(SHLIB_CFLAGS) -c $<
+
+../build/ucx/properties$(OBJ_EXT): properties.c cx/properties.h \
+ cx/common.h cx/string.h cx/allocator.h cx/map.h cx/collection.h \
+ cx/iterator.h cx/compare.h cx/hash_key.h cx/buffer.h
+	$(CC) -o $@ $(CFLAGS) $(SHLIB_CFLAGS) -c $<
+
+../build/ucx/streams$(OBJ_EXT): streams.c cx/streams.h cx/common.h \
+ cx/allocator.h
+	$(CC) -o $@ $(CFLAGS) $(SHLIB_CFLAGS) -c $<
+
+../build/ucx/string$(OBJ_EXT): string.c cx/string.h cx/common.h \
+ cx/allocator.h
+	$(CC) -o $@ $(CFLAGS) $(SHLIB_CFLAGS) -c $<
+
+../build/ucx/szmul$(OBJ_EXT): szmul.c cx/common.h
+	$(CC) -o $@ $(CFLAGS) $(SHLIB_CFLAGS) -c $<
+
+../build/ucx/tree$(OBJ_EXT): tree.c cx/tree.h cx/common.h cx/collection.h \
+ cx/allocator.h cx/iterator.h cx/compare.h
+	$(CC) -o $@ $(CFLAGS) $(SHLIB_CFLAGS) -c $<
+

mercurial