1. Torr_Samaho
  2. skulltag

Source

skulltag / FLAC / Makefile

# 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 (msys,$(OSTYPE))
  WIN=1
  WINCMD=0
endif


STATICLIB = libflac.a

#LOC = -DASMV
#LOC = -DDEBUG -g

DEFINES = -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 = -f elf -DM_TARGET_LINUX

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
md5.o: md5.c
stream_decoder.o: stream_decoder.c
stream_decoder_pp.o: stream_decoder_pp.cpp