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.
1.1 KiB
1.1 KiB
#
# This makefile is used to build trick utils standalone.
# That is, without Trick.
#
# It does NOT create lib or object dirs for each platform.
#
# Once ran, all libraries go into "lib" .
TRICK_HOST_CPU := $(shell uname -s)
CC = cc
OBJ_DIR = object_${TRICK_HOST_CPU}
ADT_LIB = $(OBJ_DIR)/libtrick_adt.a
FLAGS = -g -I../include -D_REENTRANT -DSTAND_ALONE -D${TRICK_HOST_CPU} -Iinclude
trick: start
start: $(ADT_LIB)
@ echo "$(ADT_LIB) is up to date"
real_clean: clean
clean:
/bin/rm -rf $(OBJ_DIR)
#=======================================================================
# TRICK_ADT
SRC_DIR = src
TRICK_ADT_OBJECTS = \
$(OBJ_DIR)/MapStrToPtr.o \
$(OBJ_DIR)/bst.o \
$(OBJ_DIR)/dllist.o \
$(OBJ_DIR)/lqueue.o \
$(OBJ_DIR)/lstack.o \
$(OBJ_DIR)/record_array.o \
$(OBJ_DIR)/bubble_sort.o
$(ADT_LIB) : $(TRICK_ADT_OBJECTS)
ar cr $(ADT_LIB) $?
@ if [ "`uname -s`" = "Darwin" ] ; then \
echo ranlib $(ADT_LIB) ; \
ranlib $(ADT_LIB) ; \
fi
$(OBJ_DIR) :
mkdir -p $(OBJ_DIR)
$(TRICK_ADT_OBJECTS) : $(OBJ_DIR)/%.o : $(SRC_DIR)/%.c | $(OBJ_DIR)
$(CC) $(FLAGS) -c $< -o $@