#/////////////////////////////////////////////////////////
#
#    - Makefile
#
#
#/////////////////////////////////////////////////////////

#	Directory Setting

#	Compiler Setting
CC                = gcc
LD                = $(CC)
INCLUDES          = -I. -Iinclude
CFLAGS            = ${INCLUDES} -O2 -g -Wall

#	Target & Object Setting
TARGET     = roast.a

OBJS1      = \
           source/roast_bufsafe.o                                \
                                                                 \
           source/roast_file.o                                   \
           source/roast_file__access.o                           \
           source/roast_file__stat.o                             \
           source/roast_file__str.o                              \
           source/roast_file_unix__isdirectory.o                 \
                                                                 \
           source/roast_str.o                                    \

                                                                 
IMPORT_LIBS = 
OBJS        = $(OBJS1) $(IMPORT_LIBS)
#SOCS1      = ${OBJS:.o=.c}

#	Suffix
.SUFFIXES: .c .o

#	make all
all: $(TARGET)

#	Compile
.c.o:
	$(CC) -c -o $@ $(CFLAGS) $<

$(TARGET): $(OBJS)
	ar r $@ $(OBJS)
	ranlib $@

#	make clean
clean:
	rm -rf $(OBJS1) $(TARGET)

#	make objclean (Clean the object only)
objclean:
	rm -rf $(OBJS1)
