mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-18 10:21:42 +00:00
95180e18e6
already. For some reason, a stock install of MinGW doesn't define it, but if you compile your own GCC, it installs headers that do. - Changed the way that the makefiles detect MSYS to a method that should be more foolproof, thanks to changes in MSYS. SVN r737 (trunk)
79 lines
1.9 KiB
Text
79 lines
1.9 KiB
Text
# Makefile for combined FLAC, FLAC++, derived from zlib's Makefile.mgw,
|
|
# which was itself derived from zlib's Makefile.dj2.
|
|
# Modified for mingw32 by C. Spieler, 6/16/98.
|
|
# Updated for zlib 1.2.x by Christian Spieler and Cosmin Truta, Mar-2003.
|
|
# Last updated: 1-Aug-2003.
|
|
|
|
# Copyright (C) 1995-2003 Jean-loup Gailly.
|
|
# For conditions of distribution and use, see copyright notice in zlib.h
|
|
|
|
ifeq (Windows_NT,$(OS))
|
|
WIN=1
|
|
WINCMD=1
|
|
endif
|
|
ifeq ($(findstring msys,$(shell sh --version 2>nul)),msys)
|
|
WIN=1
|
|
WINCMD=0
|
|
endif
|
|
|
|
STATICLIB = libflac.a
|
|
|
|
#LOC = -DASMV
|
|
#LOC = -DDEBUG -g
|
|
|
|
DEFINES = -D__MINW32__ -DWIN32 -DNDEBUG -D_LIB -DFLAC__CPU_IA32 -DFLAC_HAS_NASM -DFLAC__SSE_OS -DFLAC__USE_3DNOW -DFLAC__NO_DLL -I.
|
|
|
|
CCDV = @../ccdv
|
|
CC = gcc
|
|
CXX = g++
|
|
CFLAGS = $(LOC) $(DEFINES) -O2 -Wall -Wno-unused-function -fomit-frame-pointer
|
|
CXXFLAGS = $(LOC) $(DEFINES) -O2 -Wall
|
|
|
|
NASM = nasm
|
|
NASMFLAGS = -d OBJ_FORMAT_win32 -f win32
|
|
|
|
AR = ar
|
|
ARFLAGS = rcs
|
|
|
|
OBJS = cpu_asm.o fixed_asm.o lpc_asm.o \
|
|
bitmath.o bitreader.o cpu.o crc.o fixed.o format.o lpc.o md5.o memory.o stream_decoder.o stream_decoder_pp.o
|
|
|
|
all: $(STATICLIB)
|
|
|
|
.c.o:
|
|
$(CCDV) $(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
.cpp.o:
|
|
$(CCDV) $(CXX) $(CXXFLAGS) -c -o $@ $<
|
|
|
|
$(STATICLIB): $(OBJS)
|
|
$(CCDV) $(AR) $(ARFLAGS) $@ $(OBJS)
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
ifeq (1,$(WINCMD))
|
|
-del /q /f $(STATICLIB) 2>nul
|
|
-del /q /f *.o 2>nul
|
|
else
|
|
rm -f $(STATICLIB)
|
|
rm -f *.o
|
|
endif
|
|
|
|
cpu_asm.o: ia32/cpu_asm.nasm
|
|
$(CCDV) $(NASM) -o $@ $(NASMFLAGS) $<
|
|
fixed_asm.o: ia32/fixed_asm.nasm
|
|
$(CCDV) $(NASM) -o $@ $(NASMFLAGS) $<
|
|
lpc_asm.o: ia32/lpc_asm.nasm
|
|
$(CCDV) $(NASM) -o $@ $(NASMFLAGS) $<
|
|
bitbuffer.o: bitbuffer.c
|
|
bitmath.o: bitmath.c
|
|
cpu.o: cpu.c
|
|
crc.o: crc.c
|
|
fixed.o: fixed.c
|
|
format.o: format.c
|
|
lpc.o: lpc.c
|
|
memory.o: memory.c
|
|
stream_decoder.o: stream_decoder.c
|
|
stream_decoder_pp.o: stream_decoder_pp.cpp
|