Skip to content
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.

Commit

Permalink
simple Makefile for mingw32
Browse files Browse the repository at this point in the history
  • Loading branch information
pijyoi committed Jul 11, 2013
1 parent bd77676 commit 51066c9
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
31 changes: 31 additions & 0 deletions builds/mingw32/Makefile.mingw32
@@ -0,0 +1,31 @@
CC=gcc
CFLAGS=-Wall -Os -g -DDLL_EXPORT -DFD_SETSIZE=1024 -I.
LIBS=-lws2_32

OBJS = address.o clock.o ctx.o dealer.o decoder.o devpoll.o dist.o encoder.o epoll.o err.o fq.o \
io_object.o io_thread.o ip.o ipc_address.o ipc_connecter.o ipc_listener.o kqueue.o lb.o \
mailbox.o msg.o mtrie.o object.o options.o own.o pair.o pgm_receiver.o pgm_sender.o \
pgm_socket.o pipe.o poll.o poller_base.o precompiled.o proxy.o pub.o pull.o push.o \
random.o reaper.o rep.o req.o router.o select.o session_base.o \
signaler.o socket_base.o stream_engine.o sub.o tcp.o tcp_address.o tcp_connecter.o tcp_listener.o \
thread.o trie.o v1_decoder.o v1_encoder.o xpub.o xsub.o zmq.o zmq_utils.o

%.o: ../../src/%.cpp
$(CC) -c -o $@ $< $(CFLAGS)

%.o: ../../perf/%.cpp
$(CC) -c -o $@ $< $(CFLAGS)

all: libzmq.dll

perf: inproc_lat.exe inproc_thr.exe local_lat.exe local_thr.exe remote_lat.exe remote_thr.exe

libzmq.dll: $(OBJS)
g++ -shared -o $@ $^ -Wl,--out-implib,$@.a $(LIBS)

%.exe: %.o libzmq.dll
g++ -o $@ $^

clean:
del *.o *.a *.dll *.exe

32 changes: 32 additions & 0 deletions builds/mingw32/platform.hpp
@@ -0,0 +1,32 @@
/*
Copyright (c) 2007-2011 iMatix Corporation
Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file
This file is part of 0MQ.
0MQ is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
0MQ is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef __ZMQ_PLATFORM_HPP_INCLUDED__
#define __ZMQ_PLATFORM_HPP_INCLUDED__

// This is the platform definition for the MSVC platform.
// As a first step of the build process it is copied to
// zmq directory to take place of platform.hpp generated from
// platform.hpp.in on platforms supported by GNU autotools.
// Place any MSVC-specific definitions here.

#define ZMQ_HAVE_WINDOWS

#endif

0 comments on commit 51066c9

Please sign in to comment.