-
Notifications
You must be signed in to change notification settings - Fork 27
/
makefile.vs
55 lines (38 loc) · 993 Bytes
/
makefile.vs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Copyright (C) powturbo 2015-2020
# nmake "NCODEC1=1" "NCODEC2=1" /f makefile.msc
# or
# nmake "AVX2=1" /f makefile.msc
.SUFFIXES: .c .obj .dllobj
CC = cl /nologo
LD = link /nologo
AR = lib /nologo
CFLAGS = /MD -I.
LDFLAGS =
LIB_LIB = libtrle.lib
LIB_DLL = trle.dll
LIB_IMP = trle.lib
OBJS = trled.obj trlec.obj
!IF "$(AVX2)" == "1"
DEFS = $(DEFS) /D__AVX2__
!endif
!IF "$(NSSE2)" != "1"
DEFS = $(DEFS) /D__SSE__
!endif
DLL_OBJS = $(OBJS:.obj=.dllobj)
all: $(LIB_LIB) trle.exe
#$(LIB_DLL) $(LIB_IMP)
.c.obj:
$(CC) -c /Fo$@ /O2 $(CFLAGS) $(DEFS) $**
.cc.obj:
$(CC) -c /Fo$@ /O2 $(CFLAGS) $(DEFS) $**
.c.dllobj:
$(CC) -c /Fo$@ /O2 $(CFLAGS) $(DEFS) /DLIB_DLL $**
$(LIB_LIB): $(OBJS)
$(AR) $(ARFLAGS) -out:$@ $(OBJS)
$(LIB_DLL): $(DLL_OBJS)
$(LD) $(LDFLAGS) -out:$@ -dll -implib:$(LIB_IMP) $(DLL_OBJS)
$(LIB_IMP): $(LIB_DLL)
trle.exe: trle.obj vs/getopt.obj $(LIB_LIB)
$(LD) $(LDFLAGS) -out:$@ $**
clean:
-del *.dll *.exe *.exp *.obj *.dllobj *.lib *.manifest 2>nul