Skip to content

Commit

Permalink
Fix makefile.vs
Browse files Browse the repository at this point in the history
  • Loading branch information
pps83 committed Feb 15, 2024
1 parent 06d6aad commit fe67cc1
Showing 1 changed file with 13 additions and 21 deletions.
34 changes: 13 additions & 21 deletions makefile.vs
Original file line number Diff line number Diff line change
@@ -1,37 +1,32 @@
# 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__ /D__AVX__
ARCH =
!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 +44,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 +66,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

0 comments on commit fe67cc1

Please sign in to comment.