conditional targets for building the windows version
authorLuigi Rizzo <rizzo@icir.org>
Sat, 17 Nov 2007 12:33:15 +0000 (12:33 +0000)
committerLuigi Rizzo <rizzo@icir.org>
Sat, 17 Nov 2007 12:33:15 +0000 (12:33 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89377 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/Makefile

index d118d3a..9790b5c 100644 (file)
@@ -142,7 +142,17 @@ endif
 minimime/libmmime.a: CHECK_SUBDIR
        @cd minimime && $(MAKE) libmmime.a
 
-asterisk: $(OBJS) editline/libedit.a db1-ast/libdb1.a minimime/libmmime.a $(AST_EMBED_LDSCRIPTS)
+ifneq ($(findstring $(OSARCH), mingw32 cygwin ),)
+MAIN_TGT:=asterisk.dll
+asterisk: cygload
+       mv cygload.exe asterisk.exe
+
+cygload: asterisk.dll
+else
+MAIN_TGT:=asterisk
+endif
+
+$(MAIN_TGT): $(OBJS) editline/libedit.a db1-ast/libdb1.a minimime/libmmime.a $(AST_EMBED_LDSCRIPTS)
        @$(CC) -c -o buildinfo.o $(ASTCFLAGS) buildinfo.c
        $(ECHO_PREFIX) echo "   [LD] $^ -> $@"
 ifneq ($(findstring chan_h323,$(MENUSELECT_CHANNELS)),)