Commit c0af3840 authored by Diego Biurrun's avatar Diego Biurrun

Simplify LDFLAGS handling for MinGW.

Originally committed as revision 4907 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 45dd4350
...@@ -9,6 +9,11 @@ VPATH=$(SRC_PATH)/libavcodec ...@@ -9,6 +9,11 @@ VPATH=$(SRC_PATH)/libavcodec
# NOTE: -I.. is needed to include config.h # NOTE: -I.. is needed to include config.h
CFLAGS=$(OPTFLAGS) -DHAVE_AV_CONFIG_H -I.. -I$(SRC_PATH)/libavutil -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE $(AMR_CFLAGS) CFLAGS=$(OPTFLAGS) -DHAVE_AV_CONFIG_H -I.. -I$(SRC_PATH)/libavutil -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE $(AMR_CFLAGS)
#FIXME: This should be in configure/config.mak
ifeq ($(CONFIG_WIN32),yes)
LDFLAGS=-Wl,--output-def,$(@:.dll=.def)
endif
OBJS= bitstream.o utils.o mem.o allcodecs.o \ OBJS= bitstream.o utils.o mem.o allcodecs.o \
mpegvideo.o jrevdct.o jfdctfst.o jfdctint.o\ mpegvideo.o jrevdct.o jfdctfst.o jfdctint.o\
mpegaudio.o ac3enc.o mjpeg.o resample.o resample2.o dsputil.o \ mpegaudio.o ac3enc.o mjpeg.o resample.o resample2.o dsputil.o \
...@@ -421,11 +426,9 @@ $(SLIBNAME): $(OBJS) ...@@ -421,11 +426,9 @@ $(SLIBNAME): $(OBJS)
ifeq ($(CONFIG_PP),yes) ifeq ($(CONFIG_PP),yes)
$(MAKE) -C libpostproc $(MAKE) -C libpostproc
endif endif
$(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS)
ifeq ($(CONFIG_WIN32),yes) ifeq ($(CONFIG_WIN32),yes)
$(CC) $(SHFLAGS) -Wl,--output-def,$(@:.dll=.def) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS)
-lib /machine:i386 /def:$(@:.dll=.def) -lib /machine:i386 /def:$(@:.dll=.def)
else
$(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS)
endif endif
dsputil.o: dsputil.c dsputil.h dsputil.o: dsputil.c dsputil.h
......
...@@ -8,6 +8,11 @@ VPATH=$(SRC_PATH)/libavformat ...@@ -8,6 +8,11 @@ VPATH=$(SRC_PATH)/libavformat
CFLAGS=$(OPTFLAGS) -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavutil -I$(SRC_PATH)/libavcodec -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE CFLAGS=$(OPTFLAGS) -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavutil -I$(SRC_PATH)/libavcodec -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
#FIXME: This should be in configure/config.mak
ifeq ($(CONFIG_WIN32),yes)
LDFLAGS=-Wl,--output-def,$(@:.dll=.def)
endif
OBJS= utils.o cutils.o os_support.o allformats.o OBJS= utils.o cutils.o os_support.o allformats.o
PPOBJS= PPOBJS=
...@@ -106,11 +111,9 @@ $(LIB): $(OBJS) $(PPOBJS) ...@@ -106,11 +111,9 @@ $(LIB): $(OBJS) $(PPOBJS)
$(RANLIB) $@ $(RANLIB) $@
$(SLIBNAME): $(OBJS) $(SLIBNAME): $(OBJS)
$(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(PPOBJS) $(AVCLIBS) $(EXTRALIBS)
ifeq ($(CONFIG_WIN32),yes) ifeq ($(CONFIG_WIN32),yes)
$(CC) $(SHFLAGS) -Wl,--output-def,$(@:.dll=.def) -o $@ $(OBJS) $(PPOBJS) $(AVCLIBS) $(EXTRALIBS)
-lib /machine:i386 /def:$(@:.dll=.def) -lib /machine:i386 /def:$(@:.dll=.def)
else
$(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(PPOBJS) $(AVCLIBS) $(EXTRALIBS)
endif endif
depend: $(SRCS) depend: $(SRCS)
......
...@@ -8,6 +8,11 @@ VPATH=$(SRC_PATH)/libavutil ...@@ -8,6 +8,11 @@ VPATH=$(SRC_PATH)/libavutil
# NOTE: -I.. is needed to include config.h # NOTE: -I.. is needed to include config.h
CFLAGS=$(OPTFLAGS) -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE CFLAGS=$(OPTFLAGS) -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE
#FIXME: This should be in configure/config.mak
ifeq ($(CONFIG_WIN32),yes)
LDFLAGS=-Wl,--output-def,$(@:.dll=.def)
endif
OBJS= mathematics.o \ OBJS= mathematics.o \
integer.o \ integer.o \
rational.o \ rational.o \
...@@ -34,11 +39,9 @@ $(LIB): $(OBJS) ...@@ -34,11 +39,9 @@ $(LIB): $(OBJS)
$(RANLIB) $@ $(RANLIB) $@
$(SLIBNAME): $(OBJS) $(SLIBNAME): $(OBJS)
$(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS)
ifeq ($(CONFIG_WIN32),yes) ifeq ($(CONFIG_WIN32),yes)
$(CC) $(SHFLAGS) -Wl,--output-def,$(@:.dll=.def) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS)
-lib /machine:i386 /def:$(@:.dll=.def) -lib /machine:i386 /def:$(@:.dll=.def)
else
$(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS)
endif endif
%.o: %.c %.o: %.c
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment