# NMT SMS center Makefile

# **********************  Variables  ********************
#
# C Compiler name
#
CC     = gcc

#
# C Compiler options
#
CFLAGS = -Wall -march=i586 -O2

#
# Libraries
#
CLIBS  = 

#
# Project name
#
PROJ   = isc_osc

OBJS   = main.o

DEP_FILES = .deps/*.P

# *********************** Rules *************************
all:$(PROJ)
#
# How to make executable
#
$(PROJ): $(OBJS)
	$(CC) $(CFLAGS) -o $(PROJ) $(OBJS) $(CLIBS)
#
# How to make objects
#
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
-include $(DEP_FILES)
%.o: %.c
	@echo '$(CC) -c $<'; $(CC) -Wp,-MD,.deps/$(*F).P $(CFLAGS) -c $<
.s.o:
	$(CC) -c $<

install: $(PROJ)
	cp -f $(PROJ) $(DESTDIR)/usr/local/bin
#
# Removing all generated files
#
clean:
	rm -f *.o $(PROJ)
	rm -rf .deps
