diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..b62babcc --- /dev/null +++ b/Makefile @@ -0,0 +1,20 @@ + +dlls = \ + libcallbackstreamdll \ + libdparserdll \ + libreqlistdll \ + libsymbolsdll \ + irpmondll + +main = irpmonc + +.PHONY: all clean $(dlls) $(main) + +all: $(dlls) + $(MAKE) -C $(main) + +$(dlls): + $(MAKE) -C $@ + +clean: + $(foreach dir,$(dlls) $(main),$(MAKE) -C $(dir) $@ &&) : diff --git a/common.mk b/common.mk new file mode 100644 index 00000000..76b67e1f --- /dev/null +++ b/common.mk @@ -0,0 +1,21 @@ + +# for cross-building with MinGW +CROSS = x86_64-w64-mingw32- +INCLUDES = -I/usr/share/mingw-w64/include + +INCLUDES += -I../include -I../shared +CPPFLAGS += $(INCLUDES) -O2 +CFLAGS += $(INCLUDES) -O2 +LDFLAGS += -municode + +CC = $(CROSS)gcc +LD = $(CROSS)ld +CXX = $(CROSS)g++ + +all: $(EXE) + +$(EXE): $(OBJS) + $(CXX) -o $@ $(LDFLAGS) $^ + +clean: + rm -f $(EXE) $(OBJS) $(DELOBJS) diff --git a/irpmonc/Makefile b/irpmonc/Makefile new file mode 100644 index 00000000..4955e67c --- /dev/null +++ b/irpmonc/Makefile @@ -0,0 +1,15 @@ + +CPPFLAGS += -DNOVSOCKETS + +LDFLAGS += \ + -L../irpmondll -lirpmondll \ + -L../libdparserdll -ldparser \ + -L../libreqlistdll -lreqlist \ + -L../libsymbolsdll -lsymbols \ + -L../libcallbackstreamdll -lcallbackstream + +EXE = irpmonc +OBJS = driver-settings.o irpmonc.o guid-api.o stop-event.o +DELOBJS = $(EXE).exe + +include ../common.mk diff --git a/irpmondll/Makefile b/irpmondll/Makefile new file mode 100644 index 00000000..549aadc6 --- /dev/null +++ b/irpmondll/Makefile @@ -0,0 +1,7 @@ + +LDFLAGS += -shared + +EXE = irpmondll.dll +OBJS = driver-com.o main.o + +include ../common.mk diff --git a/libcallbackstreamdll/Makefile b/libcallbackstreamdll/Makefile new file mode 100644 index 00000000..f4262bc0 --- /dev/null +++ b/libcallbackstreamdll/Makefile @@ -0,0 +1,7 @@ + +LDFLAGS += -shared + +EXE = callbackstream.dll +OBJS = callback-stream.o + +include ../common.mk diff --git a/libdparserdll/Makefile b/libdparserdll/Makefile new file mode 100644 index 00000000..b3a0c624 --- /dev/null +++ b/libdparserdll/Makefile @@ -0,0 +1,7 @@ + +LDFLAGS += -shared + +EXE = dparser.dll +OBJS = dparser.o + +include ../common.mk diff --git a/libreqlistdll/Makefile b/libreqlistdll/Makefile new file mode 100644 index 00000000..422fb014 --- /dev/null +++ b/libreqlistdll/Makefile @@ -0,0 +1,7 @@ + +LDFLAGS += -shared + +EXE = reqlist.dll +OBJS = reqlist.o + +include ../common.mk diff --git a/libsymbolsdll/Makefile b/libsymbolsdll/Makefile new file mode 100644 index 00000000..4c4ac2e6 --- /dev/null +++ b/libsymbolsdll/Makefile @@ -0,0 +1,7 @@ + +LDFLAGS += -shared + +EXE = symbols.dll +OBJS = symbols.o + +include ../common.mk diff --git a/libvsock/Makefile b/libvsock/Makefile new file mode 100644 index 00000000..5003ac2d --- /dev/null +++ b/libvsock/Makefile @@ -0,0 +1,7 @@ + +LDFLAGS += -shared + +EXE = libvsock.dll +OBJS = libvsock.o + +include ../common.mk