diff --git a/Makefile b/Makefile index 4924cdb..403b15a 100644 --- a/Makefile +++ b/Makefile @@ -51,7 +51,8 @@ else BINARY = mspdebug endif -GCC_CFLAGS = -O1 -Wall -Wno-char-subscripts -ggdb +INCLUDES = -I. -Isimio +GCC_CFLAGS = -O1 -Wall -Wno-char-subscripts -ggdb $(INCLUDES) MSPDEBUG_LDFLAGS = $(LDFLAGS) $(PORTS_LDFLAGS) MSPDEBUG_LIBS = -lusb $(READLINE_LIBS) $(WIN32_LIBS) @@ -61,6 +62,7 @@ all: $(BINARY) clean: rm -f *.o + rm -f */*.o rm -f $(BINARY) install: $(BINARY) mspdebug.man @@ -72,13 +74,57 @@ install: $(BINARY) mspdebug.man .SUFFIXES: .c .o -$(BINARY): main.o fet.o rf2500.o dis.o uif.o olimex.o ihex.o elf32.o stab.o \ - util.o bsl.o sim.o symmap.o gdb.o btree.o rtools.o sym.o devcmd.o \ - reader.o vector.o output_util.o expr.o fet_error.o binfile.o \ - fet_db.o usbutil.o titext.o srec.o device.o coff.o opdb.o output.o \ - cmddb.o stdcmd.o prog.o flash_bsl.o list.o simio.o simio_tracer.o \ - simio_timer.o simio_wdt.o simio_hwmult.o simio_gpio.o aliasdb.o \ - gdb_proto.o gdbc.o sport.o sockets.o +OBJ=\ + main.o \ + fet.o \ + rf2500.o \ + dis.o \ + uif.o \ + olimex.o \ + ihex.o \ + elf32.o \ + stab.o \ + util.o \ + bsl.o \ + sim.o \ + symmap.o \ + gdb.o \ + btree.o \ + rtools.o \ + sym.o \ + devcmd.o \ + reader.o \ + vector.o \ + output_util.o \ + expr.o \ + fet_error.o \ + binfile.o \ + fet_db.o \ + usbutil.o \ + titext.o \ + srec.o \ + device.o \ + coff.o \ + opdb.o \ + output.o \ + cmddb.o \ + stdcmd.o \ + prog.o \ + flash_bsl.o \ + list.o \ + simio/simio.o \ + simio/simio_tracer.o \ + simio/simio_timer.o \ + simio/simio_wdt.o \ + simio/simio_hwmult.o \ + simio/simio_gpio.o \ + aliasdb.o \ + gdb_proto.o \ + gdbc.o \ + sport.o \ + sockets.o \ + +$(BINARY): $(OBJ) $(CC) $(MSPDEBUG_LDFLAGS) -o $@ $^ $(MSPDEBUG_LIBS) .c.o: diff --git a/simio.c b/simio/simio.c similarity index 100% rename from simio.c rename to simio/simio.c diff --git a/simio.h b/simio/simio.h similarity index 100% rename from simio.h rename to simio/simio.h diff --git a/simio_cpu.h b/simio/simio_cpu.h similarity index 100% rename from simio_cpu.h rename to simio/simio_cpu.h diff --git a/simio_device.h b/simio/simio_device.h similarity index 100% rename from simio_device.h rename to simio/simio_device.h diff --git a/simio_gpio.c b/simio/simio_gpio.c similarity index 100% rename from simio_gpio.c rename to simio/simio_gpio.c diff --git a/simio_gpio.h b/simio/simio_gpio.h similarity index 100% rename from simio_gpio.h rename to simio/simio_gpio.h diff --git a/simio_hwmult.c b/simio/simio_hwmult.c similarity index 100% rename from simio_hwmult.c rename to simio/simio_hwmult.c diff --git a/simio_hwmult.h b/simio/simio_hwmult.h similarity index 100% rename from simio_hwmult.h rename to simio/simio_hwmult.h diff --git a/simio_timer.c b/simio/simio_timer.c similarity index 100% rename from simio_timer.c rename to simio/simio_timer.c diff --git a/simio_timer.h b/simio/simio_timer.h similarity index 100% rename from simio_timer.h rename to simio/simio_timer.h diff --git a/simio_tracer.c b/simio/simio_tracer.c similarity index 100% rename from simio_tracer.c rename to simio/simio_tracer.c diff --git a/simio_tracer.h b/simio/simio_tracer.h similarity index 100% rename from simio_tracer.h rename to simio/simio_tracer.h diff --git a/simio_wdt.c b/simio/simio_wdt.c similarity index 100% rename from simio_wdt.c rename to simio/simio_wdt.c diff --git a/simio_wdt.h b/simio/simio_wdt.h similarity index 100% rename from simio_wdt.h rename to simio/simio_wdt.h