# Makefile for p4 api
# Shiv Sikand Fri May 28 18:00:52 PDT 1999
CC = gcc -O2 "-Dconst_char=const char" -DOS_SOLARIS
CPP = g++ -O2 "-Dconst_char=const char" -DOS_SOLARIS
LOADFLAGS = -DOS_SOLARIS "-Dconst_char=const char"
LOADLIBES = -L../api -lclient -lrpc -lsupp -lnsl -lsocket -lposix4
PROGRAM = p4skillserver
CPPSRCS = main.C
CSRCS = split.c handle.c
HEADERPATH = -I../api
CPPOBJS = $(CPPSRCS:.C=.o)
COBJS = $(CSRCS:.c=.o)
FIRST_RULE: ${PROGRAM} # Compile any sources. Find the .h files in HEADERPATH.
.C.o:
@echo Compiling $< ; rm -f ${PROGRAM}
${CPP} -c ${CFLAGS} $< ${HEADERPATH}
.c.o:
@echo Compiling $< ; rm -f ${PROGRAM}
${CC} -c ${CFLAGS} $< ${HEADERPATH}
# Link the target program using ld.
${PROGRAM}:${CPPOBJS} ${COBJS}
@echo Linking ${PROGRAM};
${CC} ${COBJS} ${CPPOBJS} ${LOADLIBES} ${HEADERPATH} ${LOADFLAGS} -o ${PROGRAM}
clean:
rm -f ${PROGRAM} ${COBJS} ${CPPOBJS}