# Makefile
TGT  = json.exe
HSRC = common.h parser.h scanner.h
OBJS = app.o common.o parser.o scanner.o
LIBS = libregex.a # none for Linux and Mac; libregex.a for Windows

RM   = del  # rm for Linux and Mac, del for Windows
TRUE = cd . # true for Linux and Mac, cd . for Windows

.SUFFIXES:          # reset all suffixes
.SUFFIXES: .c .o	# suffixes to consider

# convert .c to .o
.c.o:; gcc -c $< -o $@	

$(TGT): $(HSRC) $(OBJS)
	gcc -o $@ $(OBJS) $(LIBS)

clean:
	$(RM) *.o | $(TRUE)
