From d1686a292096fc4375daba36ea53aa865dc2bc81 Mon Sep 17 00:00:00 2001 From: WestleyK Date: Fri, 29 Nov 2019 16:31:53 -0800 Subject: [PATCH] Correctly use the CFLAGS --- .github/workflows/lf_test.yml | 2 +- Makefile | 36 +++++++++++++++++------------------ src/extcmp.c | 2 +- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/lf_test.yml b/.github/workflows/lf_test.yml index 2111b05..a951960 100644 --- a/.github/workflows/lf_test.yml +++ b/.github/workflows/lf_test.yml @@ -14,7 +14,7 @@ jobs: - name: make test [default] run: make test - name: make clean && make without-ouner-group-names - run: make clean && make without-ouner-group-names + run: make cleanall && make WITH_ID=true - name: make test [without-ouner-group-names] run: make test diff --git a/Makefile b/Makefile index a7cfe5a..a3278b4 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ # email: westleyr@nym.hush.com # Date: Nov 23, 2019 # https://github.com/WestleyR/list-files -# Version-1.0.12 +# Version-2.0.0 # # The Clear BSD License # @@ -26,6 +26,14 @@ ifeq ($(DEBUG), true) CFLAGS += -DDEBUG endif +ifeq ($(STATIC), true) + CFLAGS += -static -DWITHOUT_NAME_GROUP_OUTPUT +endif + +ifeq ($(WITH_ID), true) + CFLAGS += -DWITHOUT_NAME_GROUP_OUTPUT +endif + SRC = $(wildcard src/*.c) SRC += $(wildcard deps/*/*.c) @@ -40,29 +48,21 @@ options: @echo "" @echo "$$ make [option]" @echo "" - @echo " [no-option], all compile the project" - @echo " static compile the static project" - @echo " without-owner-group-names dont print the user/group names," - @echo " DEBUG=true compile target as debug" - @echo " instead print the uid/gid." - @echo " install install the binary to the PREFIX," - @echo " (dafault '/usr/local/bin')" - @echo " clean clean the binary" - @echo " uninstall uninstall the binary from PREFIX" + @echo " [no-option], all compile the project" + @echo " STATIC=true compile the static project" + @echo " WITH_ID=true dont print the user/group names," + @echo " DEBUG=true compile target as debug" + @echo " instead print the uid/gid." + @echo " install install the binary to the PREFIX," + @echo " (dafault '/usr/local/bin')" + @echo " clean clean the binary" + @echo " uninstall uninstall the binary from PREFIX" @echo "" .PHONY: $(TARGET): $(OBJS) $(CC) $(CFLAGS) $(LDFLAGS) -o $(TARGET) $(OBJS) -.PHONY: -static: $(OBJS) - $(CC) $(CFLAGS) -DWITHOUT_NAME_GROUP_OUTPUT -static -o $(TARGET) $(MAIN) - -.PHONY: -without-ouner-group-names: $(OBJS) - $(CC) $(CFLAGS) -DWITHOUT_NAME_GROUP_OUTPUT -o $(TARGET) $(MAIN) - .PHONY: %.o: %.c $(CC) $(DEP_FLAG) $(CFLAGS) $(LDFLAGS) -o $@ -c $< diff --git a/src/extcmp.c b/src/extcmp.c index 9855b47..78bf888 100644 --- a/src/extcmp.c +++ b/src/extcmp.c @@ -1,6 +1,6 @@ // created by: WestleyR // email: westleyr@nym.hush.com -// https://github.com/WestleyR/??? +// https://github.com/WestleyR/list-files // date: Nov 29, 2019 // version-1.0.0 //