#
#   This program is free software: you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation, either version 3 of the License, or
#   (at your option) any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with this program.  If not, see <http://www.gnu.org/licenses/>.
#

RM = rm -f
CFLAGS += -Wall -O2
OBJS = ezxml.o crc32.o flash_config.o file_config.o xconfig.o
PROGS = xconfig xconfig_nand xconfig_file

all: xconfig
xconfig xconfig_nand xconfig_file: $(OBJS)
	$(CC) $(CFLAGS) -o $@ $(OBJS)

ezxml.o: ezxml.h ezxml.c
crc32.o: crc32.h crc32.c
flash_config.o: flash_config.h flash_config.c
file_config.o: file_config.h file_config.c
xconfig.o: xconfig.h xconfig.c

.c.o:
	$(CC) $(CFLAGS) -c -o $@ $<
 
clean:
	${RM} ${PROGS} ${OBJS}

.PHONY: all clean