-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.Windows
52 lines (43 loc) · 1.32 KB
/
Makefile.Windows
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
### Compiler flags
# make CC=x86_64-w64-mingw32-gcc WINVER=-D_WIN32_WINNT=0x0600 TARGET=prl_nettool_vista.exe clean all -f Makefile.Windows
VERSION=$(shell cat Makefile.version)
CC32 = i686-w64-mingw32-gcc
CC64 = x86_64-w64-mingw32-gcc
WLH = -D_WIN32_WINNT=0x0600
WXP = -D_WIN32_WINNT=0x0502
CFLAGS = -Wall -Wno-unused -Wno-unused-function -O2 -g -D_WIN_ $(WINVER) -DVERSION=\"$(VERSION)\"
CFLAGS += -DDEBUG_OPT_COMPARE
DESTDIR=
LDFLAGS = -liphlpapi -ldnsapi -lole32 -lws2_32 -lcfgmgr32
TARGET = prl_nettool.exe
MKDIR = mkdir -p
MV = mv -f
NETTOOL_VERSION = "$(VERSION)"
NETTOOL_MANUFACTURER = "Virtuozzo"
all: $(TARGET)
all-dist: i686 x86_64
i686:
$(MKDIR) build/$@
$(MAKE) CC=$(CC32) WINVER=$(WXP) \
clean all -f Makefile.Windows
$(MV) *.exe build/$@/
$(MAKE) CC=$(CC32) WINVER=$(WLH) TARGET=prl_nettool_vista.exe \
clean all -f Makefile.Windows
$(MKDIR) build/$@
$(MV) *.exe build/$@/
x86_64:
$(MKDIR) build/$@
$(MAKE) CC=$(CC64) WINVER=$(WXP) \
clean all -f Makefile.Windows
$(MV) *.exe build/$@/
$(MAKE) CC=$(CC64) WINVER=$(WLH) TARGET=prl_nettool_vista.exe \
clean all -f Makefile.Windows
$(MV) *.exe build/$@/
$(TARGET): netinfo.o setnet.o namelist.o common.o netinfo_common.o options.o nettool.o
$(CC) $^ $(LDFLAGS) -o $@
.c.o:
$(CC) -c $(CFLAGS) $(INC) $< -o $@
clean:
$(RM) *.o *.exe
distclean: clean
$(RM) build