mirror of
https://github.com/troglobit/libite.git
synced 2026-10-18 10:49:38 +00:00
Add autotest for mkpath() and makepath()
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
b59249714b
commit
57c49bfe0c
4 files changed
+26
-21
No files matched your search
@@ -3,6 +3,15 @@
|
||||
# Figure out root of library, unless used as submodule
|
||||
ROOTDIR ?= $(shell pwd)
|
||||
|
||||
CC ?= $(CROSS)gcc
|
||||
AR ?= $(CROSS)ar
|
||||
STRIP ?= $(CROSS)strip
|
||||
INSTALL := install --backup=off
|
||||
STRIPINST := $(INSTALL) -s --strip-program=$(CROSS)strip -m 0755
|
||||
|
||||
CPPFLAGS += -D_GNU_SOURCE
|
||||
ARFLAGS = crus
|
||||
|
||||
# Default to silent build, use V=1 to get verbose mode.
|
||||
ifeq ($V,1)
|
||||
Q =
|
||||
@@ -16,7 +25,11 @@ REDIRECT = >/dev/null
|
||||
MAKEFLAGS = --no-print-directory --silent
|
||||
endif
|
||||
|
||||
export ROOTDIR Q PRINT MAKEFLAGS
|
||||
# Default install paths
|
||||
prefix ?= /usr/local
|
||||
libdir ?= $(prefix)/lib
|
||||
datadir ?= $(prefix)/share/doc/$(LIBNAME)
|
||||
incdir ?= $(prefix)/include
|
||||
|
||||
# Pretty printing and GCC -M for auto dep files
|
||||
%.o: %.c
|
||||
@@ -29,7 +42,7 @@ export ROOTDIR Q PRINT MAKEFLAGS
|
||||
|
||||
%.test: %.c
|
||||
$(PRINT) " TEST $(subst $(ROOTDIR)/,,$(shell pwd)/)$(@:.test=)\n"
|
||||
$(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -DUNITTEST $< $(OBJS)
|
||||
$(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -g -o $@ -DUNITTEST $< $(OBJS)
|
||||
$(Q)@./$@ $(REDIRECT)
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user