test/Makefile

changeset 155
45395ba5ed30
parent 154
8346aebfbb7b
child 156
6a4bd1f4c57e
equal deleted inserted replaced
154:8346aebfbb7b 155:45395ba5ed30
24 # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 # POSSIBILITY OF SUCH DAMAGE. 26 # POSSIBILITY OF SUCH DAMAGE.
27 # 27 #
28 28
29 include ../unix.mk
30 include ../$(CONF).mk 29 include ../$(CONF).mk
31 30
32 SRC = main.c 31 SRC = main.c
33 SRC += list_tests.c 32 SRC += list_tests.c
34 SRC += mpool_tests.c 33 SRC += mpool_tests.c
37 SRC += string_tests.c 36 SRC += string_tests.c
38 SRC += logging_tests.c 37 SRC += logging_tests.c
39 SRC += buffer_tests.c 38 SRC += buffer_tests.c
40 SRC += utils_tests.c 39 SRC += utils_tests.c
41 40
42 OBJ = $(SRC:%.c=../build/%$(OBJ_EXT)) 41 OBJ = $(SRC:%.c=../build/release/test/%$(OBJ_EXT))
42 OBJ_D = $(SRC:%.c=../build/debug/test/%$(OBJ_EXT))
43 43
44 all: ../build/ ../build/test 44 all: ../build/release/test ../build/release/test/ucxtest$(APP_EXT)
45 debug: ../build/debug/test ../build/debug/test/ucxtest$(APP_EXT)
45 46
46 ../build/test: $(OBJ) 47 ../build/release/test/ucxtest$(APP_EXT): $(OBJ)
47 $(LD) $(LDFLAGS) $(LOFLAGS)../build/test$(APP_EXT) $(OBJ) \ 48 $(LD) $(LDFLAGS) $(LOFLAGS)../build/release/test/ucxtest$(APP_EXT) \
48 ../build/libucx$(LIB_EXT) 49 $(OBJ) ../build/release/libucx$(LIB_EXT)
49 50
50 ../build/%$(OBJ_EXT): %.c 51 ../build/release/test/%$(OBJ_EXT): %.c
51 $(CC) $(CFLAGS) -I../ $(COFLAGS)$@ $< 52 $(CC) $(CFLAGS) -I../ $(COFLAGS)$@ $<
52 53
53 ../build: 54 ../build/release/test:
54 $(MKDIR) $(MKDIRFLAGS) ../build/test 55 $(MKDIR) $(MKDIRFLAGS) ../build/release/test
56
57 ../build/debug/test/ucxtest$(APP_EXT): $(OBJ_D)
58 $(LD) $(LDFLAGS_D) $(LOFLAGS)../build/debug/test/ucxtest$(APP_EXT) \
59 $(OBJ_D) ../build/debug/libucx$(LIB_EXT)
60
61 ../build/debug/test/%$(OBJ_EXT): %.c
62 $(CC) $(CFLAGS_D) -I../ $(COFLAGS)$@ $<
63
64 ../build/debug/test:
65 $(MKDIR) $(MKDIRFLAGS) ../build/debug/test

mercurial