# # Do the following to start a new project: # - replace ods_c with the name of your Project, # - set implementation language suffix (c or cc) # - set the Directories, # - set CC appropiate, # - CFLAGS appropiate, # - set latex command, # - set your dvi to Postscript translator command and # - set the command to preview dvi files. # PROJ_NAME = rt_fix # the implementation language LANG = c # the path to include files INCLUDE = /usr/local/include # Directory where project binaries are kept PROJ_BIN = ../bin # Directory where project libraries are kept PROJ_LIB = ../lib # Directory where project includes are kept PROJ_INCLUDE = ../include # Directory where project sources are kept PROJ_SRC = ../src CC = gcc K_CFLAGS = -I${INCLUDE} -I${PROJ_INCLUDE} -O2 -Wall -D__KERNEL__ -D__RT__ L_CFLAGS = -I${INCLUDE} -I${PROJ_INCLUDE} -O2 -Wall # Header for this project HDR= ${PROJ_INCLUDE}/${PROJ_NAME}.h SRC= ${PROJ_SRC}/${PROJ_NAME}.${LANG} # library of this project LIB= ${PROJ_LIB}/lib${PROJ_NAME}.so # Objects of this project OBJ= ${PROJ_BIN}/${PROJ_NAME}.o all: compile compile: ${LIB} ${OBJ} ${LIB}: ${HDR} ${SRC} ${CC} ${L_CFLAGS} -c ${SRC} -o ${OBJ} ld -shared -o $@ ${OBJ} rm -f ${OBJ} ${OBJ}: ${HDR} ${SRC} ${CC} ${K_CFLAGS} -c ${SRC} -o $@ clean: rm -f ${LIB} \ rm -f ${OBJ}