forked from angr/vex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile-msvc
50 lines (36 loc) · 1.18 KB
/
Makefile-msvc
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
!include common.mk
##
## Step 1: A bunch of defines
##
!if "$(MULTIARCH)" == "1"
LIB_OBJS = $(NORMAL_OBJS) $(MULTIARCH_OBJS)
!else
LIB_OBJS = $(NORMAL_OBJS) $(MULTIARCH_OBJS)
!endif
CC = cl
CC_NATIVE = cl
AR = lib
RM = del /F
STATIC_LIBRARY_FILE = libvex.lib
DYNAMIC_LIBRARY_FILE = libvex.dll
EXTRA_CLEAN_FILES = auxprogs/genoffsets.exe genoffsets.obj
CCFLAGS = /Ipub /Ipriv $(EXTRA_CFLAGS) /O2 /wd4715 /DPYVEX
all: vex
$(STATIC_LIBRARY_FILE): $(LIB_OBJS)
$(AR) -OUT:libvex.lib $(LIB_OBJS)
$(DYNAMIC_LIBRARY_FILE): $(LIB_OBJS)
@echo "Currently, we don't build libvex.dll."
@echo "Doing so would require assembling a list of export symbols."
pub\libvex_guest_offsets.h: $(PUB_HEADERS) auxprogs/genoffsets.c
$(CC_NATIVE) $(CCFLAGS) auxprogs\genoffsets.c \
/Fo:auxprogs\genoffsets.o /Fe:auxprogs\genoffsets.exe
auxprogs\genoffsets.exe > pub\libvex_guest_offsets.h
.SUFFIXES: .o .c
.c.o:
$(CC) /Fo:$@ -c $< $(CCFLAGS)
scratch: clean all
vex: $(GEN_HEADERS:/=\) $(STATIC_LIBRARY_FILE) $(DYNAMIC_LIBRARY_FILE)
clean:
$(RM) $(GEN_HEADERS:/=\) $(NORMAL_OBJS:/=\) $(SINGLEARCH_OBJS:/=\) $(MULTIARCH_OBJS:/=\) \
$(STATIC_LIBRARY_FILE:/=\) $(DYNAMIC_LIBRARY_FILE:/=\) \
$(EXTRA_CLEAN_FILES:/=\)