From bfc65d24a008bb4832368c1f9964b617df051fa1 Mon Sep 17 00:00:00 2001 From: Laurent MAZET Date: Thu, 2 May 2024 17:19:37 +0200 Subject: [PATCH] clean linux/windows included library --- cmore.c | 1 + makefile | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) 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 -- 2.30.2