Skip to content

Commit bf893bf

Browse files
committed
Add makefiles for building irpmonc with MinGW
Supports parallel building of the DLLs. For now without WMware vSockets. Signed-off-by: Tormod Volden <[email protected]>
1 parent 6cb5fd6 commit bf893bf

File tree

9 files changed

+98
-0
lines changed

9 files changed

+98
-0
lines changed

Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
dlls = \
3+
libcallbackstreamdll \
4+
libdparserdll \
5+
libreqlistdll \
6+
libsymbolsdll \
7+
irpmondll
8+
9+
main = irpmonc
10+
11+
.PHONY: all clean $(dlls) $(main)
12+
13+
all: $(dlls)
14+
$(MAKE) -C $(main)
15+
16+
$(dlls):
17+
$(MAKE) -C $@
18+
19+
clean:
20+
$(foreach dir,$(dlls) $(main),$(MAKE) -C $(dir) $@ &&) :

common.mk

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
# for cross-building with MinGW
3+
CROSS = x86_64-w64-mingw32-
4+
INCLUDES = -I/usr/share/mingw-w64/include
5+
6+
INCLUDES += -I../include -I../shared
7+
CPPFLAGS += $(INCLUDES) -O2
8+
CFLAGS += $(INCLUDES) -O2
9+
LDFLAGS += -municode
10+
11+
CC = $(CROSS)gcc
12+
LD = $(CROSS)ld
13+
CXX = $(CROSS)g++
14+
15+
all: $(EXE)
16+
17+
$(EXE): $(OBJS)
18+
$(CXX) -o $@ $(LDFLAGS) $^
19+
20+
clean:
21+
rm -f $(EXE) $(OBJS) $(DELOBJS)

irpmonc/Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
CPPFLAGS += -DNOVSOCKETS
3+
4+
LDFLAGS += \
5+
-L../irpmondll -lirpmondll \
6+
-L../libdparserdll -ldparser \
7+
-L../libreqlistdll -lreqlist \
8+
-L../libsymbolsdll -lsymbols \
9+
-L../libcallbackstreamdll -lcallbackstream
10+
11+
EXE = irpmonc
12+
OBJS = driver-settings.o irpmonc.o guid-api.o stop-event.o
13+
DELOBJS = $(EXE).exe
14+
15+
include ../common.mk

irpmondll/Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
LDFLAGS += -shared
3+
4+
EXE = irpmondll.dll
5+
OBJS = driver-com.o main.o
6+
7+
include ../common.mk

libcallbackstreamdll/Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
LDFLAGS += -shared
3+
4+
EXE = callbackstream.dll
5+
OBJS = callback-stream.o
6+
7+
include ../common.mk

libdparserdll/Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
LDFLAGS += -shared
3+
4+
EXE = dparser.dll
5+
OBJS = dparser.o
6+
7+
include ../common.mk

libreqlistdll/Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
LDFLAGS += -shared
3+
4+
EXE = reqlist.dll
5+
OBJS = reqlist.o
6+
7+
include ../common.mk

libsymbolsdll/Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
LDFLAGS += -shared
3+
4+
EXE = symbols.dll
5+
OBJS = symbols.o
6+
7+
include ../common.mk

libvsock/Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
LDFLAGS += -shared
3+
4+
EXE = libvsock.dll
5+
OBJS = libvsock.o
6+
7+
include ../common.mk

0 commit comments

Comments
 (0)