Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix makefile.vs #121

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 12 additions & 21 deletions makefile.vs
Original file line number Diff line number Diff line change
@@ -1,37 +1,31 @@
# powturbo (c) Copyright 2013-2019
# nmake /f makefile.vs
# or
# nmake "AVX2=1" /f makefile.vs
# "C:\Program Files\Microsoft Visual Studio"\2022\Community\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x86\nmake /f makefile.vs

.SUFFIXES: .c .obj .dllobj

#CC = cl /nologo
CC = "C:\Program Files\Microsoft Visual Studio"\2022\Community\VC\Tools\MSVC\14.34.31933\bin\Hostx64\x86\cl /nologo
INCLUDE = -I"C:\Program Files\Microsoft Visual Studio"\2022\Community\VC\Tools\MSVC\14.34.31933\include
CC = cl /nologo
LD = link /nologo
AR = lib /nologo
CFLAGS = /MD /O2 -I. /W0 $(INCLUDE)
CFLAGS = /MD /O2 -I. /W0
LDFLAGS =
ARCH =
ARCH = /arch:AVX
AVX2 = 1

LIB_LIB = libic.lib
LIB_DLL = ic.dll
LIB_IMP = ic.lib

OBJS = bitpack.obj bitunpack.obj bitutil.obj fp.obj lz.obj transpose.obj trlec.obj trled.obj vp4c.obj vp4d.obj vint.obj vsimple.obj vsimple.obj v8.obj v8pack.obj
OBJS_SSE = vs\transpose_sse.obj
OBJS_AVX2 = vs\vp4c_avx2.obj vs\vp4d_avx2.obj vs\transpose_avx2.obj vs\bitpack_avx2.obj vs\bitunpack_avx2.obj vs\bitutil_avx2.obj
OBJS = lib\bic.obj lib\bitpack.obj lib\bitunpack.obj lib\bitutil.obj lib\eliasfano.obj lib\fp.obj lib\iccodec.obj lib\transpose.obj lib\transpose_.obj lib\trlec.obj lib\trled.obj lib\v8.obj lib\v8pack.obj lib\vbit.obj lib\vint.obj lib\vp4c.obj lib\vp4d.obj lib\vsimple.obj
OBJS_AVX2 = vs\bitpack_avx2.obj vs\bitunpack_avx2.obj vs\bitutil_avx2.obj vs\transpose_avx2.obj vs\vp4c_avx2.obj vs\vp4d_avx2.obj

!if "$(NSIMD)" == "1"
CFLAGS = $(CFLAGS) /DNSIMD
!else
OBJS = $(OBJS) $(OBJS_SSE)
CFLAGS = $(CFLAGS) /D__SSE__ /D__SSE2__ /D__SSE3__ /D__SSSE3__ /D__SSE4_1__ /D__SSE4_2__ /DUSE_SSE
OBJS = $(OBJS)
CFLAGS = $(CFLAGS) /D__SSE__ /D__SSE2__ /D__SSE3__ /D__SSSE3__ /D__SSE4_1__ /D__SSE4_2__
!if "$(AVX2)" == "1"
OBJS = $(OBJS) $(OBJS_AVX2)
CFLAGS = $(CFLAGS) /D__AVX2__ /DUSE_AVX2
ARCH = /arch:AVX2
# ARCH = /arch:AVX2
!endif
!endif

Expand All @@ -49,7 +43,7 @@ CFLAGS = $(CFLAGS) /DBLOSC

DLL_OBJS = $(OBJS:.obj=.dllobj)

all: $(LIB_LIB) icbench.exe icapp.exe
all: $(LIB_LIB) icapp.exe

#$(LIB_DLL) $(LIB_IMP)

Expand All @@ -71,11 +65,8 @@ $(LIB_DLL): $(DLL_OBJS)

$(LIB_IMP): $(LIB_DLL)

icbench.exe: icbench.obj vs\getopt.obj plugins.obj eliasfano.obj $(LIB_LIB)
$(LD) $(LDFLAGS) -out:$@ $**

icapp.exe: icapp.obj vs\getopt.obj plugins.obj eliasfano.obj $(LIB_LIB)
icapp.exe: lib\icapp.obj vs\getopt.obj $(LIB_LIB)
$(LD) $(LDFLAGS) -out:$@ $**

clean:
-del *.obj vs\*.obj *.dll *.exe *.exp *.dllobj *.lib *.manifest 2>nul
-del *.obj vs\*.obj lib\*.obj *.dll *.exe *.exp *.dllobj *.lib *.manifest 2>nul
Loading