diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-04-07 18:33:12 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-04-07 18:33:12 +0200 |
commit | f822e622bb4a112e38dc74bf11f1b3a1e6e066f2 (patch) | |
tree | 384916009aa79f9c80d60d9f874a028641ba8b62 /Makefile | |
parent | fix warnings (diff) | |
download | libpassphrase-f822e622bb4a112e38dc74bf11f1b3a1e6e066f2.tar.gz libpassphrase-f822e622bb4a112e38dc74bf11f1b3a1e6e066f2.tar.bz2 libpassphrase-f822e622bb4a112e38dc74bf11f1b3a1e6e066f2.tar.xz |
add test + fix example in info manual1396888621
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | Makefile | 19 |
1 files changed, 13 insertions, 6 deletions
@@ -57,24 +57,24 @@ STD = gnu99 # C preprocessor flags CPPFLAGS_ = $(foreach D, $(OPTIONS), -D'$(D)=1') $(CPPFLAGS) # C compiling flags -CFLAGS_ = -std=$(STD) $(WARN) -fPIC $(CFLAGS) +_fPIC = -fPIC +CFLAGS_ = -std=$(STD) $(WARN) $(_fPIC) $(CFLAGS) # Linking flags -LDFLAGS_ = -shared $(LDFLAGS) +_shared = -shared +LDFLAGS_ = $(_shared) $(LDFLAGS) # Flags to use when compiling and assembling CC_FLAGS = $(CPPFLAGS_) $(CFLAGS_) $(OPTIMISE) # Flags to use when linking LD_FLAGS = $(LDFLAGS_) $(CFLAGS_) $(OPTIMISE) -SRC = passphrase -OBJ = $(foreach S, $(SRC), obj/$(S).o) .PHONY: default default: libpassphrase info .PHONY: all -all: libpassphrase doc +all: libpassphrase test doc .PHONY: doc doc: info pdf ps dvi @@ -82,7 +82,14 @@ doc: info pdf ps dvi .PHONY: libpassphrase libpassphrase: bin/libpassphrase.so -bin/libpassphrase.so: $(OBJ) +.PHONY: test +test: bin/test + +bin/libpassphrase.so: obj/passphrase.o + @mkdir -p bin + $(CC) $(LD_FLAGS) -o "$@" $^ + +bin/test: obj/passphrase.o obj/test.o @mkdir -p bin $(CC) $(LD_FLAGS) -o "$@" $^ |