mirror of
https://github.com/nasa/trick.git
synced 2024-12-19 05:07:54 +00:00
14a75508a3
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.
972 B
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 $@