From: Laurent MAZET Date: Thu, 2 May 2024 15:19:37 +0000 (+0200) Subject: clean linux/windows included library X-Git-Tag: cmore-1.0~28 X-Git-Url: https://secure.softndesign.org/git/?a=commitdiff_plain;h=bfc65d24a008bb4832368c1f9964b617df051fa1;p=cmore.git clean linux/windows included library --- diff --git a/cmore.c b/cmore.c index ade7089..89054e1 100644 --- a/cmore.c +++ b/cmore.c @@ -1,6 +1,7 @@ /* depend: */ /* cflags: */ /* linker: cmd.o debug.o tui.o -lcurses */ +/* winlnk: cmd.o debug.o tui.o -lpdcurses */ #include diff --git a/makefile b/makefile index 9e0aa28..1624fa5 100644 --- a/makefile +++ b/makefile @@ -15,8 +15,10 @@ CFLAGS += -W -Wall -Wextra -g CFLAGS += $(OFLAGS) $(INCLUDES) $(OPTIONS) LDFLAGS += -g $(OPTIONS) +LDOPT = linker ifeq ($(OS),Windows_NT) #LDLIBS += -lws2_32 +LDOPT = winlnk endif @@ -148,7 +150,7 @@ valgrind_%: %.exe %.ld: %.c $(call TITLE, "Building $@") - echo ${<:.c=.exe}: $(shell perl -- getcomments.pl -p='linker:\s' -f='%' $< | awk '{for (i=1;i<=NF;i++) if ($$(i) ~ /.o$$/) printf " %s", $$(i)}') > $@ + echo ${<:.c=.exe}: $(shell perl -- getcomments.pl -p='$(LDOPT):\s' -f='%' $< | awk '{for (i=1;i<=NF;i++) if ($$(i) ~ /.o$$/) printf " %s", $$(i)}') > $@ $(call PASS, SUCCESS) %.o: %.c @@ -159,7 +161,7 @@ valgrind_%: %.exe %.exe: %.o %.d $(call TITLE, "Building $@") - $(CC) $(LDFLAGS) $< $(shell perl -- getcomments.pl -p='linker:\s' -f='%' ${<:.o=.c}) $(LDLIBS) -o $@ + $(CC) $(LDFLAGS) $< $(shell perl -- getcomments.pl -p='$(LDOPT):\s' -f='%' ${<:.o=.c}) $(LDLIBS) -o $@ $(call PASS, SUCCESS) ## Phony