
CC = gcc
#CFLAGS = -O
CFLAGS = -g -Wall

LD = gcc
LDFLAGS = 

RM = /bin/rm -f

SRCS = commandLine.c
OBJS = commandLine.o
PROG = commandLine

DEPEND = makefile.depend

#############################################
all: $(PROG)

%: %.o
	$(LD) $(LDFLAGS) -o $* $<

### this will try to compile any .c
### also loose dependency of main.o on main.h
%.o: %.c
	$(CC) $(CFLAGS) -c $<

clean:
	$(RM) $(PROG) $(OBJS) core

depend:
	$(RM) $(DEPEND)
	makedepend -f- -- $(CFLAGS) -- $(SRCS) > $(DEPEND)

##############################################
include $(DEPEND)








