# Makefile

CC = gcc
LD = gcc

SRC	:= ihex.c strarg.c strtoint.c
OBJ	:= ihex.o strarg.o strtoint.o
HDR	:= ihex.h strarg.h strtoint.h
MAN1	:= ihex.1
BIN	:= ihex

SDP	:= Makefile $(HDR)
BDP	:= Makefile $(OBJ)


all: $(BIN)


ihex: $(BDP)
	$(LD) $(LDFLAGS) $(OBJ) -o $@


clean:
	rm -f $(OBJ) $(BIN)


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


ihex.o:		ihex.c $(SDP)
strarg.o:	strarg.c $(SDP)
strtoint.o:	strtoint.c $(SDP)
