Moved object files to build/

Sat, 31 Dec 2011 15:54:08 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sat, 31 Dec 2011 15:54:08 +0100
changeset 1
20c788d1e278
parent 0
1e4522fddff0
child 2
79646375a420

Moved object files to build/

Makefile file | annotate | diff | comparison | revisions
test/Makefile file | annotate | diff | comparison | revisions
ucx/Makefile file | annotate | diff | comparison | revisions
     1.1 --- a/Makefile	Sat Dec 31 14:04:40 2011 +0100
     1.2 +++ b/Makefile	Sat Dec 31 15:54:08 2011 +0100
     1.3 @@ -50,11 +50,10 @@
     1.4  	cd test; $(MAKE) CONF=$(CONF) all
     1.5  
     1.6  run: FORCE test
     1.7 -	./test/test$(APP_EXT)
     1.8 +	./build/test$(APP_EXT)
     1.9  
    1.10  clean: FORCE
    1.11 -	$(RM) $(RMFLAGS) ucx/*.$(OBJ_EXT) ucx/*.$(LIB_EXT)
    1.12 -	$(RM) $(RMFLAGS) test/*.$(OBJ_EXT) test/test$(APP_EXT)
    1.13 +	$(RM) $(RMFLAGS) build/*
    1.14  
    1.15  FORCE:
    1.16  
     2.1 --- a/test/Makefile	Sat Dec 31 14:04:40 2011 +0100
     2.2 +++ b/test/Makefile	Sat Dec 31 15:54:08 2011 +0100
     2.3 @@ -30,13 +30,13 @@
     2.4  
     2.5  SRC = main.c
     2.6  
     2.7 -OBJ = $(SRC:%.c=%.$(OBJ_EXT))
     2.8 +OBJ = $(SRC:%.c=../build/%.$(OBJ_EXT))
     2.9  
    2.10 -all: test1
    2.11 +all: ../build/test1
    2.12  
    2.13 -test1: $(OBJ)
    2.14 -	$(LD) $(LDFLAGS) -o test$(APP_EXT) $(OBJ) ../ucx/libucx.a
    2.15 +../build/test1: $(OBJ)
    2.16 +	$(LD) $(LDFLAGS) -o ../build/test$(APP_EXT) $(OBJ) ../build/libucx.a
    2.17  
    2.18 -%.$(OBJ_EXT): %.c
    2.19 -	$(CC) $(CFLAGS) -I../ -c $<
    2.20 +../build/%.$(OBJ_EXT): %.c
    2.21 +	$(CC) $(CFLAGS) -I../ -o $@ -c $<
    2.22  
     3.1 --- a/ucx/Makefile	Sat Dec 31 14:04:40 2011 +0100
     3.2 +++ b/ucx/Makefile	Sat Dec 31 15:54:08 2011 +0100
     3.3 @@ -31,13 +31,13 @@
     3.4  # list of source files
     3.5  SRC = 
     3.6  
     3.7 -OBJ = $(SRC:%.c=%.$(OBJ_EXT))
     3.8 +OBJ = $(SRC:%.c=../build/%.$(OBJ_EXT))
     3.9  
    3.10  all: libucx
    3.11  
    3.12  libucx: $(OBJ)
    3.13 -	$(AR) $(ARFLAGS) libucx.$(LIB_EXT) $(OBJ)
    3.14 +	$(AR) $(ARFLAGS) ../build/libucx.$(LIB_EXT) $(OBJ)
    3.15  
    3.16 -%.$(OBJ_EXT): %.c
    3.17 -	$(CC) $(CFLAGS) -c $<
    3.18 +../build/%.$(OBJ_EXT): %.c
    3.19 +	$(CC) $(CFLAGS) -c $< -o $@
    3.20  

mercurial