summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.osx24
-rw-r--r--src/ivy.c13
2 files changed, 15 insertions, 22 deletions
diff --git a/src/Makefile.osx b/src/Makefile.osx
index efdaa29..1a0e42f 100644
--- a/src/Makefile.osx
+++ b/src/Makefile.osx
@@ -26,9 +26,7 @@ OBJ = ivyloop.o timer.o ivysocket.o ivy.o ivybuffer.o ivyfifo.o ivybind.o interv
CC=gcc
LIBTOOL=ar q # linux and solaris
CFLAGS = -g -Wall $(FPIC)
-
-TARGETS = ivyprobe ivyperf ivythroughput
-
+TOOLS_DIR = ../tools
# ------------------------------------------------------------------------------------------
.c.o:
@@ -38,14 +36,12 @@ TARGETS = ivyprobe ivyperf ivythroughput
$(CPP) $(CFLAGS) -c $*.cpp
-all: static-libs commands shared-libs
+all: static-libs shared-libs tools
static-libs: libivy.a
shared-libs: libivy.dylib
-commands: $(TARGETS)
-
ivybind.o: ivybind.c
$(CC) -c $(CFLAGS) $(REGEXP) $(PCREINC) ivybind.c
@@ -56,21 +52,13 @@ libivy.a: $(OBJ)
libivy.dylib: $(OBJ)
$(CC) -dynamiclib -o $@ $(OBJ) $(PCRELIB)
-ivyprobe: ivyprobe.o libivy.a
- $(CC) $(CFLAGS) -o $@ ivyprobe.o -L. -livy $(PCRELIB) $(EXTRALIB)
-
-ivythroughput: ivythroughput.o libivy.a
- $(CPP) $(CFLAGS) $(PCREINC) -o $@ ivythroughput.o -L. -livy -lpcrecpp $(PCRELIB) $(EXTRALIB)
-
-ivyperf: ivyperf.o libivy.a
- $(CC) $(CFLAGS) -o $@ ivyperf.o -L. -livy $(PCRELIB) $(EXTRALIB)
-
# ------------------------------------------------------------------------------------------
installlibs: static-libs shared-libs
test -d $(DESTDIR)$(PREFIX)$(LIB) || mkdir -p $(DESTDIR)$(PREFIX)$(LIB)
install -m644 libivy.a $(DESTDIR)$(PREFIX)$(LIB)
install -m644 libivy.dylib $(DESTDIR)$(PREFIX)$(LIB)
+ @(cd $(TOOLS_DIR) && $(MAKE) -f Makefile.osx install)
includes:
test -d $(DESTDIR)$(PREFIX)/include/Ivy || mkdir -p $(DESTDIR)$(PREFIX)/include/Ivy
@@ -90,9 +78,13 @@ installbins: commands
install -m755 ivyprobe $(DESTDIR)$(PREFIX)/bin
install -m755 ivyperf $(DESTDIR)$(PREFIX)/bin
+tools: static-libs
+ @(cd $(TOOLS_DIR) && $(MAKE) -f Makefile.osx)
+
install: installlibs installbins includes
# ------------------------------------------------------------------------------------------
clean:
- -rm -f $(TARGETS) *.o *.a *.dylib *.dylib.* *~ \ No newline at end of file
+ -rm -f *.o *.a *.dylib *.dylib.* *~
+ @(cd $(TOOLS_DIR) && $(MAKE) -f Makefile.osx clean)
diff --git a/src/ivy.c b/src/ivy.c
index 1cae380..eb0e4df 100644
--- a/src/ivy.c
+++ b/src/ivy.c
@@ -16,9 +16,7 @@
*/
/*
- TODO : ° compil sur mac
- ° faire un repertoire exemple avec tous les executables
- ° commit svn (penser aux fichiers nouveaux, et deplacés)
+ TODO : ° sync svn
° compil sur windows
° faire un configure
° mettre à jour la doc / site web
@@ -875,7 +873,7 @@ void IvyStart (const char* bus)
{
struct in_addr baddr;
- unsigned long mask = 0xffffffff;
+ unsigned int mask = 0xffffffff;
unsigned char elem = 0;
int numdigit = 0;
int numelem = 0;
@@ -948,12 +946,15 @@ void IvyStart (const char* bus)
} else {
baddr.s_addr = htonl(mask);
- printf ("Broadcasting on network %s, port %d\n", inet_ntoa(baddr), SupervisionPort);
+ printf ("Broadcasting on network %s, port %d\n",
+ inet_ntoa(baddr), SupervisionPort);
/* test mask value agaisnt CLASS D */
if ( IN_MULTICAST( mask ) )
SocketAddMember (broadcast , mask );
- SocketSendBroadcast (broadcast, mask, SupervisionPort, "%d %hu %s %s\n", IVYMAJOR_VERSION, ApplicationPort, ApplicationID, ApplicationName);
+ SocketSendBroadcast (broadcast, mask, SupervisionPort,
+ "%d %hu %s %s\n", IVYMAJOR_VERSION, ApplicationPort,
+ ApplicationID, ApplicationName);
numelem = 0;
mask = 0xffffffff;
}