fixed makefiles

Fri, 06 Sep 2013 17:01:53 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Fri, 06 Sep 2013 17:01:53 +0200
changeset 154
8346aebfbb7b
parent 153
2d3d1313862a
child 155
45395ba5ed30

fixed makefiles

Makefile file | annotate | diff | comparison | revisions
test/Makefile file | annotate | diff | comparison | revisions
ucx/Makefile file | annotate | diff | comparison | revisions
--- a/Makefile	Fri Sep 06 13:28:05 2013 +0200
+++ b/Makefile	Fri Sep 06 17:01:53 2013 +0200
@@ -43,6 +43,8 @@
 include unix.mk
 include $(CONF).mk
 
+all: ucx test
+
 ucx: FORCE
 	cd ucx; $(MAKE) CONF=$(CONF) all
 	
@@ -52,7 +54,7 @@
 run: FORCE test
 	./build/test$(APP_EXT)
 
-install: ucx | $(PREFIX)/include/ucx $(PREFIX)/lib
+install: ucx $(PREFIX)/lib $(PREFIX)/include/ucx
 	cp ./build/libucx$(LIB_EXT) $(PREFIX)/lib && \
         cp ./ucx/*.h $(PREFIX)/include/ucx
 
--- a/test/Makefile	Fri Sep 06 13:28:05 2013 +0200
+++ b/test/Makefile	Fri Sep 06 17:01:53 2013 +0200
@@ -41,12 +41,14 @@
 
 OBJ = $(SRC:%.c=../build/%$(OBJ_EXT))
 
-all: $(OBJ)
+all: ../build/ ../build/test
+
+../build/test: $(OBJ)
 	$(LD) $(LDFLAGS) $(LOFLAGS)../build/test$(APP_EXT) $(OBJ) \
 		../build/libucx$(LIB_EXT)
 
-../build/%$(OBJ_EXT): %.c | ../build
+../build/%$(OBJ_EXT): %.c
 	$(CC) $(CFLAGS) -I../ $(COFLAGS)$@ $<
 
 ../build:
-	$(MKDIR) $(MKDIRFLAGS) build
+	$(MKDIR) $(MKDIRFLAGS) ../build/test
--- a/ucx/Makefile	Fri Sep 06 13:28:05 2013 +0200
+++ b/ucx/Makefile	Fri Sep 06 17:01:53 2013 +0200
@@ -43,12 +43,12 @@
 
 OBJ = $(SRC:%.c=../build/ucx/%$(OBJ_EXT))
 
-all: libucx
+all: ../build/ucx ../build/libucx$(LIB_EXT)
 
-libucx: $(OBJ)
+../build/libucx$(LIB_EXT): $(OBJ)
 	$(AR) $(ARFLAGS) $(AOFLAGS)../build/libucx$(LIB_EXT) $(OBJ)
 
-../build/ucx/%$(OBJ_EXT): %.c | ../build/ucx
+../build/ucx/%$(OBJ_EXT): %.c
 	$(CC) $(CFLAGS) $(COFLAGS)$@ $<
 
 ../build/ucx:

mercurial