Rev 883 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed | ?url?
.SUFFIXES : .o .cpp .a
!ifdef USE_CLANG
CXX_COMPILER=clang++
CXX_LTO=
!else
CXX_COMPILER=g++
CXX_LTO=#-flto
!endif
CXX=$(CXX_COMPILER) -c
#-DD3DVECTOR_DEFINED
CFLAGS_COMMON=-D_CRT_SECURE_NO_DEPRECATE -DUSE_SND_EXTERNAL_BUFFER -D_PREFIX_ -std=c++11 -Wno-attributes -I../sdk
!ifdef SSE1
CFLAGS_COMMON=$(CFLAGS_COMMON) -march=pentium3 -msse
!elseifdef SSE2
CFLAGS_COMMON=$(CFLAGS_COMMON) -march=pentium4 -msse2 -D_M_IX86_FP=2
!elseifdef NATIVE
CFLAGS_COMMON=$(CFLAGS_COMMON) -march=native
!else
CFLAGS_COMMON=$(CFLAGS_COMMON) -march=pentium2 -mmmx
!endif
!ifdef DEBUG
CFLAGS_DEBUG=-O0 -g -DDEBUG -D_DEBUG
!else
CFLAGS_RELEASE=-O3 $(CXX_LTO) -fomit-frame-pointer
!endif
CXXFLAGS=$(CFLAGS_COMMON) $(CFLAGS_DEBUG) $(CFLAGS_RELEASE)
CFLAGS=$(CFLAGS_COMMON) $(CFLAGS_DEBUG) $(CFLAGS_RELEASE)
LIBFLAGS=q
LIB=ar
all: snd.a
.c.o::
$(CXX) $(CFLAGS) $<
.cpp.o::
$(CXX) $(CXXFLAGS) $<
snd.a: sndbuffer.o sndchip.o saa1099.o sndcounter.o sndrender.o
$(LIB) $(LIBFLAGS) $@ $**
clean:
-del *.o *.a