-
Notifications
You must be signed in to change notification settings - Fork 104
/
zproject_cygwin.gsl
50 lines (41 loc) · 1.4 KB
/
zproject_cygwin.gsl
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
# Generate cygwin makefile for project
#
# This is a code generator built using the iMatix GSL code generation
# language. See https://github.com/zeromq/gsl for details.
#
# Copyright (c) the Contributors as noted in the AUTHORS file.
# This file is part of zproject.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
register_target ("cygwin", "Cygwin build system")
.macro target_cygwin
.directory.create ('builds/cygwin')
.output "builds/cygwin/Makefile.cygwin"
$(project.GENERATED_WARNING_HEADER:)
CC=gcc
# replace the following with wherever you have installed libzmq
PREFIX=/usr/local
INCDIR=-I$\(PREFIX)/include -I.
LIBDIR=-L$\(PREFIX)/lib
CFLAGS=-Wall -Os -g -D$(PROJECT.PREFIX)_EXPORTS $\(INCDIR)
OBJS =\
.for class
$(name:c).o\
.endfor
.if count (class)
$(project.prefix)_private_selftest.o
.endif
%.o: ../../src/%.c
$\(CC) -c -o $@ $< $\(CFLAGS)
all: $(project.libname).dll $(project.prefix)_selftest.exe
$(project.libname).dll: $\(OBJS)
$\(CC) -shared -o $@ $\(OBJS) -Wl,--out-implib,[email protected] $\(LIBDIR) -lzmq
# the test functions are not exported into the DLL
$(project.prefix)_selftest.exe: $(project.prefix)_selftest.o $\(OBJS)
$\(CC) -o $@ $^ $\(LIBDIR) -lzmq
clean:
del *.o *.a *.dll *.exe
$(project.GENERATED_WARNING_HEADER:)
.endmacro