On Tue, 3 Nov 1998 [EMAIL PROTECTED] wrote:

> I'm trying to work out if it's possible to get a makefile to compile 2
> separate programs.
> 
> Not two programs built as one but two programs that will run
> separately.
> 
> prog1 is a test server for messages from prog2
> 

The following makes five progarms called client1, client2, server1,
server2, and conv from the same makefile.  Hopefully it can help you out.
Comments and flames are also welcome on my probably awful makefile style:)


# solaris libs
#LIBS = -lsocket -lresolv

CPPFLAGS = -Wall -gstabs+

CPP = g++
CC  = gcc

CLIENT1 =       TCPSocket.o \
                client1.o

CLIENT2 =       TCPSocket.o \
                client2.o

SERVER1 =       TCPSocket.o \
                server1.o

SERVER2 =       TCPSocket.o \
                server2.o


all: client1 client2 server1 server2 conv

client1: ${CLIENT1}
        ${CPP} ${CLIENT1}  ${CPPFLAGS} ${LIBS} -o client1

client2: ${CLIENT2}
        ${CPP} ${CLIENT2}  ${CPPFLAGS} ${LIBS} -o client2

server1: ${SERVER1}
        ${CPP} ${SERVER1}  ${CPPFLAGS} ${LIBS} -o server1

server2: ${SERVER2}
        ${CPP} ${SERVER2}  ${CPPFLAGS} ${LIBS} -o server2

conv: conv.c
        ${CPP}  conv.c   ${CPPFLAGS} ${LIBS} -o conv

clean:
        rm -f *.o core client1 server1 client2 server2 conv

emacs-clean:
        rm -f *~


    .......  [EMAIL PROTECTED]
     `:::'     Kevin Sivits  .......  ......
      :::  *                  `::.    ::'    one world
      ::: .::  .:.::.  .:: .::  `::. :'      one people 
      :::  ::   ::  ::  ::  ::    :::.      one goverment
      ::: .::. .::  ::.  `::::. .:'  ::.       one OS
    ..:::.....................::'   .::::.

#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)

from sys import*;from string import*;a=argv;[s,p,q]=filter(lambda x:x[:1]!=
'-',a);d='-d'in a;e,n=atol(p,16),atol(q,16);l=(len(q)+1)/2;o,inb=l-d,l-1+d
while s:s=stdin.read(inb);s and map(stdout.write,map(lambda i,b=pow(reduce(
lambda x,y:(x<<8L)+y,map(ord,s)),e,n):chr(b>>8*i&255),range(o-1,-1,-1))) 

Please visit http://online.offshore.com.ai/arms-trafficker/     

Reply via email to