summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorFabrice Bellard <fabrice@bellard.org>2001-08-15 22:29:44 +0000
committerFabrice Bellard <fabrice@bellard.org>2001-08-15 22:29:44 +0000
commitdaf8e9557d55d13d45b83329db59f711fb9c7251 (patch)
tree448fb3e0b81e49abb4e24b31814cf1954fd30519 /Makefile
parent1705679ee64038011224b3cb5fc582ffa5699557 (diff)
added win32 cross compile support
Originally committed as revision 107 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 12 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index d810a2c72a..e93365bf7d 100644
--- a/Makefile
+++ b/Makefile
@@ -10,7 +10,13 @@ CFLAGS+=-p
LDFLAGS+=-p
endif
-PROG= ffmpeg ffserver
+ifeq ($(CONFIG_WIN32),yes)
+EXE=.exe
+PROG=ffmpeg$(EXE)
+else
+EXT=
+PROG=ffmpeg ffserver
+endif
all: lib $(PROG)
@@ -18,14 +24,14 @@ lib:
$(MAKE) -C libavcodec all
$(MAKE) -C libav all
-ffmpeg: ffmpeg.o libav/libav.a libavcodec/libavcodec.a
- gcc $(LDFLAGS) -o $@ $^ -lm
+ffmpeg$(EXE): ffmpeg.o libav/libav.a libavcodec/libavcodec.a
+ $(CC) $(LDFLAGS) -o $@ $^ -lm
-ffserver: ffserver.o libav/libav.a libavcodec/libavcodec.a
- gcc $(LDFLAGS) -o $@ $^ -lm
+ffserver$(EXE): ffserver.o libav/libav.a libavcodec/libavcodec.a
+ $(CC) $(LDFLAGS) -o $@ $^ -lm
%.o: %.c
- gcc $(CFLAGS) -c -o $@ $<
+ $(CC) $(CFLAGS) -c -o $@ $<
install: all
install -s -m 755 $(PROG) $(prefix)/bin