From 155e3737bdff37d6b7559dd0863644394127f1a7 Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Wed, 16 May 2012 12:50:01 +0400 Subject: [PATCH] Cygwin support. --- build.smk | 2 +- smake.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build.smk b/build.smk index 7b7bce8..4b7686d 100644 --- a/build.smk +++ b/build.smk @@ -22,7 +22,7 @@ ifeq ($(mode),release) endif CFLAGS += -Wall $(INCLUDES) -LDFLAGS += -Wall $(LIBS) +LDFLAGS += -Wall all: @make change_make_options &>/dev/null diff --git a/smake.sh b/smake.sh index d450d17..0c928dc 100755 --- a/smake.sh +++ b/smake.sh @@ -103,6 +103,7 @@ echo >> Makefile # ======= Test for target ======= TARGET_SRC= for tgt in $REP_TARGETS; do + tgt=${tgt%.exe} tgt_src= for ext in c cpp cxx cc; do [ -f "$tgt.$ext" ] && tgt_src=$tgt.$ext && break @@ -262,7 +263,7 @@ for tgt_src in $TARGET_SRC; do echo >> Makefile echo >> Makefile echo '$(TARGET'$i'): $(target_objs'$i')' >> Makefile - echo -e '\t$(CC) $(LDFLAGS) -o $@ $(target_objs'$i')' >> Makefile + echo -e '\t$(CC) $(LDFLAGS) -o $@ $(target_objs'$i') $(LIBS)' >> Makefile echo >> Makefile echo >> Makefile