trick/trick_source/trick_utils/shm/makefile.stand_alone
Alex Lin 14a75508a3 Cleaning up once include variables and copyright cleanup.
Changed all header file once include variables to follow the same naming
convention and not start with any underscores.  Also deleted old
incorrect copyright notices.  Also removed $Id: tags from all files.

Fixes #14.  Fixes #22.
2015-03-23 16:03:14 -05:00

972 B

 
#
# This makefile is used to build trick utils standalone.
# That is, without Trick.
#
 
TRICK_HOST_CPU := $(shell uname -s)
 
CC = cc
CPP = c++
 
SHM_INC_DIR = include
 
OBJ_DIR = object_${TRICK_HOST_CPU}
SHM_LIB = $(OBJ_DIR)/libtrick_shm.a
 
FLAGS = -g -I../include -D_REENTRANT -DSTAND_ALONE
 
trick: start
 
start: $(SHM_LIB)
@ echo "$(SHM_LIB) is up to date"
 
real_clean: clean
 
clean:
/bin/rm -rf $(OBJ_DIR)
 
#=======================================================================
# SHM
 
SRC_DIR = src
 
SHM_OBJECTS = $(OBJ_DIR)/tsm_disconnect.o \
$(OBJ_DIR)/tsm_init.o \
$(OBJ_DIR)/tsm_init_with_lock.o \
$(OBJ_DIR)/tsm_reconnect.o
 
$(SHM_LIB): $(SHM_OBJECTS)
ar cr $(SHM_LIB) $?
@ if [ "${TRICK_RANLIB}" != "" ] ; then \
echo ${TRICK_RANLIB} $(SHM_LIB) ; \
${TRICK_RANLIB} $(SHM_LIB) ; \
fi
 
$(OBJ_DIR):
mkdir -p $(OBJ_DIR)
 
$(SHM_OBJECTS) : $(OBJ_DIR)/%.o : $(SRC_DIR)/%.c | $(OBJ_DIR)
$(CC) $(FLAGS) -c $< -o $@