zcsf: fixes
This commit is contained in:
parent
40d5db4c09
commit
3b5237c3f5
4 changed files with 7 additions and 5 deletions
|
|
@ -19,7 +19,7 @@ $(shell mkdir -p $(BINDIR))
|
|||
# automatically finds .h
|
||||
DEPS = $(shell find $(IDIR) -type f -regex '.*\.h')
|
||||
# automatically finds .c and makes the corresponding .o rule
|
||||
OBJ = $(shell find $(SRCDIR) -type f -regex '.*\.c' | sed 's|\.c$|.o|g;s|$(SRCDIR)/|$(ODIR)/|g')
|
||||
OBJ = $(shell find $(SRCDIR) -type f -regex '.*\.c' | sed 's|\.c|.o|g;s|$(SRCDIR)/|$(ODIR)/|g')
|
||||
|
||||
$(ODIR)/%.o: $(SRCDIR)/%.c $(DEPS)
|
||||
$(CC) $(CXXFLAGS) -c -o $@ $<
|
||||
|
|
|
|||
|
|
@ -8,9 +8,11 @@ NAME = hello
|
|||
LDFLAGS =
|
||||
|
||||
CC=g++
|
||||
CXXFLAGS= -I$(IDIR) -Wall -pedantic -std=c++17 -O2
|
||||
CXXFLAGS= -I$(IDIR) -Wall -pedantic -std=c++17
|
||||
ifeq ($(DEBUG),true)
|
||||
CXXFLAGS += -g
|
||||
else
|
||||
CXXFLAGS += -O2
|
||||
endif
|
||||
|
||||
$(shell mkdir -p $(ODIR))
|
||||
|
|
@ -19,7 +21,7 @@ $(shell mkdir -p $(BINDIR))
|
|||
# automatically finds .h and .hpp
|
||||
DEPS = $(shell find $(IDIR) -type f -regex '.*\.hp?p?')
|
||||
# automatically finds .c and .cpp and makes the corresponding .o rule
|
||||
OBJ = $(shell find $(SRCDIR) -type f -regex '.*\.cp?p?' | sed 's|\.cp?p?$|.o|g;s|$(SRCDIR)/|$(ODIR)/|g')
|
||||
OBJ = $(shell find $(SRCDIR) -type f -regex '.*\.cp?p?' | sed 's|\.cpp|.o|g;s|\.c|.o|g;s|$(SRCDIR)/|$(ODIR)/|g')
|
||||
|
||||
$(ODIR)/%.o: $(SRCDIR)/%.c $(DEPS)
|
||||
$(CC) $(CXXFLAGS) -c -o $@ $<
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ else
|
|||
local_configpath="$HOME/.config/zcsf"
|
||||
fi
|
||||
|
||||
usr_configpath="/usr/share/z/zcsf"
|
||||
usr_configpath="/usr/share/zcsf"
|
||||
|
||||
if [ -n "$CONFIGPATH" ]
|
||||
then
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ _zcsf_completion()
|
|||
_compwords=""
|
||||
fi
|
||||
|
||||
COMPREPLY=($(compgen -W "$_compwords" "${COMP_WORDS[$COMP_CWORD]}"))
|
||||
COMPREPLY=($(compgen -W "$_compwords" "${COMP_WORDS[$COMP_CWORD]}" 2>/dev/null))
|
||||
}
|
||||
|
||||
complete -F _zcsf_completion -o dirnames zcsf
|
||||
|
|
|
|||
Loading…
Reference in a new issue