moving source files to dedicated directory
This commit is contained in:
parent
8ee72d80dd
commit
55505c08a6
|
@ -7,27 +7,12 @@
|
||||||
.settings
|
.settings
|
||||||
.simulated_eeprom.bin
|
.simulated_eeprom.bin
|
||||||
.subdirs
|
.subdirs
|
||||||
animations/bitmapscroller/obj_avr
|
|
||||||
animations/bitmapscroller/obj_sim
|
|
||||||
animations/obj_avr
|
|
||||||
animations/obj_sim
|
|
||||||
autoconf.h
|
|
||||||
borg_hw/obj_avr
|
|
||||||
borgsim
|
borgsim
|
||||||
borgsim.exe
|
borgsim.exe
|
||||||
can/obj_avr
|
|
||||||
can/obj_sim
|
|
||||||
config.mk
|
config.mk
|
||||||
games/breakout/obj_avr
|
docs/html
|
||||||
games/breakout/obj_sim
|
docs/latex
|
||||||
games/snake/obj_avr
|
|
||||||
games/snake/obj_sim
|
|
||||||
games/space_invaders/obj_avr
|
|
||||||
games/space_invaders/obj_sim
|
|
||||||
games/tetris/obj_avr
|
|
||||||
games/tetris/obj_sim
|
|
||||||
gmon.out
|
gmon.out
|
||||||
html
|
|
||||||
image
|
image
|
||||||
image.bin
|
image.bin
|
||||||
image.elf
|
image.elf
|
||||||
|
@ -38,23 +23,38 @@ image.srec
|
||||||
image_eeprom.bin
|
image_eeprom.bin
|
||||||
image_eeprom.hex
|
image_eeprom.hex
|
||||||
image_eeprom.srec
|
image_eeprom.srec
|
||||||
joystick/obj_avr
|
|
||||||
joystick/obj_sim
|
|
||||||
latex
|
|
||||||
menu/obj_avr
|
|
||||||
menu/obj_sim
|
|
||||||
obj_avr
|
obj_avr
|
||||||
obj_sim
|
obj_sim
|
||||||
random/obj_avr
|
scripts/lxdialog/*.o
|
||||||
random/obj_sim
|
|
||||||
rfm12/obj_avr
|
|
||||||
rfm12/obj_sim
|
|
||||||
scripts/lxdialog/a.exe
|
scripts/lxdialog/a.exe
|
||||||
scripts/lxdialog/lxdialog
|
scripts/lxdialog/lxdialog
|
||||||
scripts/lxdialog/lxdialog.exe
|
scripts/lxdialog/lxdialog.exe
|
||||||
scripts/lxdialog/*.o
|
src/animations/bitmapscroller/obj_avr
|
||||||
scrolltext/obj_avr
|
src/animations/bitmapscroller/obj_sim
|
||||||
scrolltext/obj_sim
|
src/animations/obj_avr
|
||||||
simulator/obj_sim
|
src/animations/obj_sim
|
||||||
smallani/obj_avr
|
src/autoconf.h
|
||||||
smallani/obj_sim
|
src/borg_hw/obj_avr
|
||||||
|
src/can/obj_avr
|
||||||
|
src/can/obj_sim
|
||||||
|
src/games/breakout/obj_avr
|
||||||
|
src/games/breakout/obj_sim
|
||||||
|
src/games/snake/obj_avr
|
||||||
|
src/games/snake/obj_sim
|
||||||
|
src/games/space_invaders/obj_avr
|
||||||
|
src/games/space_invaders/obj_sim
|
||||||
|
src/games/tetris/obj_avr
|
||||||
|
src/games/tetris/obj_sim
|
||||||
|
src/joystick/obj_avr
|
||||||
|
src/joystick/obj_sim
|
||||||
|
src/menu/obj_avr
|
||||||
|
src/menu/obj_sim
|
||||||
|
src/random/obj_avr
|
||||||
|
src/random/obj_sim
|
||||||
|
src/rfm12/obj_avr
|
||||||
|
src/rfm12/obj_sim
|
||||||
|
src/scrolltext/obj_avr
|
||||||
|
src/scrolltext/obj_sim
|
||||||
|
src/simulator/obj_sim
|
||||||
|
src/smallani/obj_avr
|
||||||
|
src/smallani/obj_sim
|
||||||
|
|
4
Doxyfile
4
Doxyfile
|
@ -52,7 +52,7 @@ PROJECT_LOGO =
|
||||||
# If a relative path is entered, it will be relative to the location
|
# If a relative path is entered, it will be relative to the location
|
||||||
# where doxygen was started. If left blank the current directory will be used.
|
# where doxygen was started. If left blank the current directory will be used.
|
||||||
|
|
||||||
OUTPUT_DIRECTORY =
|
OUTPUT_DIRECTORY = docs
|
||||||
|
|
||||||
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
|
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
|
||||||
# 4096 sub-directories (in 2 levels) under the output directory of each output
|
# 4096 sub-directories (in 2 levels) under the output directory of each output
|
||||||
|
@ -647,7 +647,7 @@ WARN_LOGFILE =
|
||||||
# directories like "/usr/src/myproject". Separate the files or directories
|
# directories like "/usr/src/myproject". Separate the files or directories
|
||||||
# with spaces.
|
# with spaces.
|
||||||
|
|
||||||
INPUT =
|
INPUT = src
|
||||||
|
|
||||||
# This tag can be used to specify the character encoding of the source files
|
# This tag can be used to specify the character encoding of the source files
|
||||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
|
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
|
||||||
|
|
79
Makefile
79
Makefile
|
@ -1,17 +1,18 @@
|
||||||
TARGET := image
|
TARGET := image
|
||||||
TARGET_SIM := borgsim
|
TARGET_SIM := borgsim
|
||||||
TOPDIR = .
|
TOPDIR = src
|
||||||
|
MAKETOPDIR = .
|
||||||
|
|
||||||
SRC = \
|
SRC = \
|
||||||
main.c \
|
$(TOPDIR)/main.c \
|
||||||
display_loop.c \
|
$(TOPDIR)/display_loop.c \
|
||||||
eeprom_reserve.c \
|
$(TOPDIR)/eeprom_reserve.c \
|
||||||
pixel.c \
|
$(TOPDIR)/pixel.c \
|
||||||
util.c \
|
$(TOPDIR)/util.c \
|
||||||
|
|
||||||
SRC_SIM = \
|
SRC_SIM = \
|
||||||
display_loop.c \
|
$(TOPDIR)/display_loop.c \
|
||||||
pixel.c \
|
$(TOPDIR)/pixel.c \
|
||||||
|
|
||||||
|
|
||||||
LAUNCH_BOOTLOADER = launch-bootloader
|
LAUNCH_BOOTLOADER = launch-bootloader
|
||||||
|
@ -24,26 +25,26 @@ all: compile-$(TARGET)
|
||||||
@echo "==============================="
|
@echo "==============================="
|
||||||
@echo "$(TARGET) compiled for: $(MCU)"
|
@echo "$(TARGET) compiled for: $(MCU)"
|
||||||
@echo "size is: "
|
@echo "size is: "
|
||||||
@$(CONFIG_SHELL) ${TOPDIR}/scripts/size $(TARGET)
|
@$(CONFIG_SHELL) scripts/size $(TARGET)
|
||||||
@echo "==============================="
|
@echo "==============================="
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# generic fluff
|
# generic fluff
|
||||||
include defaults.mk
|
include $(MAKETOPDIR)/defaults.mk
|
||||||
#include $(TOPDIR)/rules.mk
|
#include $(MAKETOPDIR)/rules.mk
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# generate SUBDIRS variable
|
# generate SUBDIRS variable
|
||||||
#
|
#
|
||||||
|
|
||||||
.subdirs: autoconf.h
|
.subdirs: $(TOPDIR)/autoconf.h
|
||||||
@ echo "checking in which subdirs to build"
|
@ echo "checking in which subdirs to build"
|
||||||
@ $(RM) -f $@
|
@ $(RM) -f $@
|
||||||
@ echo "SUBDIRS += animations" >> $@
|
@ echo "SUBDIRS += $(TOPDIR)/animations" >> $@
|
||||||
@ echo "SUBDIRS += animations/bitmapscroller" >> $@
|
@ echo "SUBDIRS += $(TOPDIR)/animations/bitmapscroller" >> $@
|
||||||
@ echo "SUBDIRS += smallani" >> $@
|
@ echo "SUBDIRS += $(TOPDIR)/smallani" >> $@
|
||||||
@ (for subdir in `grep -e "^#define .*_SUPPORT" autoconf.h \
|
@ (for subdir in `grep -e "^#define .*_SUPPORT" $(TOPDIR)/autoconf.h \
|
||||||
| sed -e "s/^#define //" -e "s/_SUPPORT.*//" \
|
| sed -e "s/^#define /$(TOPDIR)\//" -e "s/_SUPPORT.*//" \
|
||||||
| tr "[A-Z]\\n" "[a-z] " `; do \
|
| tr "[A-Z]\\n" "[a-z] " `; do \
|
||||||
test -d $$subdir && echo "SUBDIRS += $$subdir" ; \
|
test -d $$subdir && echo "SUBDIRS += $$subdir" ; \
|
||||||
done) | sort -u >> $@
|
done) | sort -u >> $@
|
||||||
|
@ -53,8 +54,8 @@ ifneq ($(MAKECMDGOALS),clean)
|
||||||
ifneq ($(MAKECMDGOALS),mrproper)
|
ifneq ($(MAKECMDGOALS),mrproper)
|
||||||
ifneq ($(MAKECMDGOALS),menuconfig)
|
ifneq ($(MAKECMDGOALS),menuconfig)
|
||||||
|
|
||||||
include $(TOPDIR)/.subdirs
|
include $(MAKETOPDIR)/.subdirs
|
||||||
include $(TOPDIR)/.config
|
include $(MAKETOPDIR)/.config
|
||||||
include $(TOPDIR)/games/games.mk
|
include $(TOPDIR)/games/games.mk
|
||||||
|
|
||||||
endif # MAKECMDGOALS!=menuconfig
|
endif # MAKECMDGOALS!=menuconfig
|
||||||
|
@ -65,7 +66,7 @@ endif # no_deps!=t
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
SUBDIRS_AVR = borg_hw
|
SUBDIRS_AVR = $(TOPDIR)/borg_hw
|
||||||
SUBDIRS_AVR += $(SUBDIRS)
|
SUBDIRS_AVR += $(SUBDIRS)
|
||||||
|
|
||||||
.PHONY: compile-subdirs_avr
|
.PHONY: compile-subdirs_avr
|
||||||
|
@ -77,7 +78,7 @@ compile-$(TARGET): compile-subdirs_avr $(TARGET).hex $(TARGET).bin $(TARGET).lst
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OBJECTS += $(patsubst %.c,./obj_avr/%.o,${SRC})
|
OBJECTS += $(patsubst $(TOPDIR)/%.c,$(TOPDIR)/obj_avr/%.o,${SRC})
|
||||||
SUBDIROBJECTS = $(foreach subdir,$(SUBDIRS_AVR),$(foreach object,$(shell cat $(subdir)/obj_avr/.objects 2>/dev/null),$(subdir)/$(object)))
|
SUBDIROBJECTS = $(foreach subdir,$(SUBDIRS_AVR),$(foreach object,$(shell cat $(subdir)/obj_avr/.objects 2>/dev/null),$(subdir)/$(object)))
|
||||||
|
|
||||||
$(TARGET): $(OBJECTS) $(SUBDIROBJECTS)
|
$(TARGET): $(OBJECTS) $(SUBDIROBJECTS)
|
||||||
|
@ -86,8 +87,8 @@ $(TARGET): $(OBJECTS) $(SUBDIROBJECTS)
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#generic rules for AVR-Build
|
#generic rules for AVR-Build
|
||||||
./obj_avr/%.o: %.c
|
$(TOPDIR)/obj_avr/%.o: $(TOPDIR)/%.c
|
||||||
@ if [ ! -d obj_avr ]; then mkdir obj_avr ; fi
|
@ if [ ! -d $(TOPDIR)/obj_avr ]; then mkdir $(TOPDIR)/obj_avr ; fi
|
||||||
@ echo "compiling $<"
|
@ echo "compiling $<"
|
||||||
@ $(CC) -o $@ $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -c $<
|
@ $(CC) -o $@ $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -c $<
|
||||||
|
|
||||||
|
@ -109,25 +110,25 @@ $(TARGET): $(OBJECTS) $(SUBDIROBJECTS)
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#Rules for simulator build
|
#Rules for simulator build
|
||||||
|
|
||||||
SUBDIRS_SIM = simulator
|
SUBDIRS_SIM = $(TOPDIR)/simulator
|
||||||
SUBDIRS_SIM += $(SUBDIRS)
|
SUBDIRS_SIM += $(SUBDIRS)
|
||||||
|
|
||||||
.PHONY: compile-subdirs_sim
|
.PHONY: compile-subdirs_sim
|
||||||
compile-subdirs_sim:
|
compile-subdirs_sim:
|
||||||
@ for dir in $(SUBDIRS_SIM); do $(MAKE) -C $$dir objects_sim || exit 5; done
|
@ for dir in $(SUBDIRS_SIM); do $(MAKE) -C $$dir objects_sim || exit 5; done
|
||||||
@ $(MAKE) -C ./simulator/ objects_sim || exit 5;
|
@ $(MAKE) -C $(TOPDIR)/simulator/ objects_sim || exit 5;
|
||||||
|
|
||||||
simulator: autoconf.h .config .subdirs compile-subdirs_sim $(TARGET_SIM)
|
simulator: $(TOPDIR)/autoconf.h .config .subdirs compile-subdirs_sim $(TARGET_SIM)
|
||||||
|
|
||||||
SUBDIROBJECTS_SIM = $(foreach subdir,$(SUBDIRS_SIM),$(foreach object,$(shell cat $(subdir)/obj_sim/.objects 2>/dev/null),$(subdir)/$(object)))
|
SUBDIROBJECTS_SIM = $(foreach subdir,$(SUBDIRS_SIM),$(foreach object,$(shell cat $(subdir)/obj_sim/.objects 2>/dev/null),$(subdir)/$(object)))
|
||||||
|
|
||||||
OBJECTS_SIM = $(patsubst %.c,obj_sim/%.o,${SRC_SIM})
|
OBJECTS_SIM = $(patsubst $(TOPDIR)/%.c,$(TOPDIR)/obj_sim/%.o,${SRC_SIM})
|
||||||
|
|
||||||
$(TARGET_SIM): $(OBJECTS_SIM) $(SUBDIROBJECTS_SIM)
|
$(TARGET_SIM): $(OBJECTS_SIM) $(SUBDIROBJECTS_SIM)
|
||||||
$(HOSTCC) $(LDFLAGS_SIM) -o $@ $(OBJECTS_SIM) $(SUBDIROBJECTS_SIM) $(LIBS_SIM)
|
$(HOSTCC) $(LDFLAGS_SIM) -o $@ $(OBJECTS_SIM) $(SUBDIROBJECTS_SIM) $(LIBS_SIM)
|
||||||
|
|
||||||
./obj_sim/%.o: %.c
|
$(TOPDIR)/obj_sim/%.o: $(TOPDIR)/%.c
|
||||||
@ if [ ! -d obj_sim ]; then mkdir obj_sim ; fi
|
@ if [ ! -d $(TOPDIR)/obj_sim ]; then mkdir $(TOPDIR)/obj_sim ; fi
|
||||||
@ echo "compiling $<"
|
@ echo "compiling $<"
|
||||||
@ $(HOSTCC) -o $@ $(CFLAGS_SIM) -c $<
|
@ $(HOSTCC) -o $@ $(CFLAGS_SIM) -c $<
|
||||||
|
|
||||||
|
@ -172,10 +173,14 @@ clean:
|
||||||
test "x$$subdir" != "x." \
|
test "x$$subdir" != "x." \
|
||||||
&& test -e $$subdir/Makefile \
|
&& test -e $$subdir/Makefile \
|
||||||
&& $(MAKE) no_deps=t -C $$subdir clean ; done ; true
|
&& $(MAKE) no_deps=t -C $$subdir clean ; done ; true
|
||||||
|
$(RM) -r $(TOPDIR)/obj_avr
|
||||||
|
$(RM) -r $(TOPDIR)/obj_sim
|
||||||
|
$(RM) $(TARGET)*
|
||||||
|
$(RM) $(TARGET_SIM) $(TARGET_SIM).exe
|
||||||
|
|
||||||
mrproper:
|
mrproper:
|
||||||
$(MAKE) clean
|
$(MAKE) clean
|
||||||
$(RM) -f autoconf.h .config config.mk .menuconfig.log .config.old
|
$(RM) -f $(TOPDIR)/autoconf.h .config config.mk .menuconfig.log .config.old
|
||||||
|
|
||||||
sflash: $(TARGET).hex
|
sflash: $(TARGET).hex
|
||||||
# $(LAUNCH_BOOTLOADER) $(SERIAL) 115200
|
# $(LAUNCH_BOOTLOADER) $(SERIAL) 115200
|
||||||
|
@ -189,23 +194,23 @@ uflash: $(TARGET).hex
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# configure ethersex
|
# configure ethersex
|
||||||
#
|
#
|
||||||
show-config: autoconf.h
|
show-config: $(TOPDIR)/autoconf.h
|
||||||
@echo
|
@echo
|
||||||
@echo "These modules are currently enabled: "
|
@echo "These modules are currently enabled: "
|
||||||
@echo "======================================"
|
@echo "======================================"
|
||||||
@grep -e "^#define .*_SUPPORT" autoconf.h | sed -e "s/^#define / * /" -e "s/_SUPPORT.*//"
|
@grep -e "^#define .*_SUPPORT" $(TOPDIR)/autoconf.h | sed -e "s/^#define / * /" -e "s/_SUPPORT.*//"
|
||||||
|
|
||||||
.PHONY: show-config
|
.PHONY: show-config
|
||||||
|
|
||||||
autoconf.h .config:
|
$(TOPDIR)/autoconf.h .config:
|
||||||
@echo make\'s goal: $(MAKECMDGOALS)
|
@echo make\'s goal: $(MAKECMDGOALS)
|
||||||
ifneq ($(MAKECMDGOALS),menuconfig)
|
ifneq ($(MAKECMDGOALS),menuconfig)
|
||||||
# make sure menuconfig isn't called twice, on `make menuconfig'
|
# make sure menuconfig isn't called twice, on `make menuconfig'
|
||||||
#test -s autoconf.h -a -s .config || $(MAKE) no_deps=t menuconfig
|
#test -s $(TOPDIR)/autoconf.h -a -s .config || $(MAKE) no_deps=t menuconfig
|
||||||
# test the target file, test fails if it doesn't exist
|
# test the target file, test fails if it doesn't exist
|
||||||
# and will keep make from looping menuconfig.
|
# and will keep make from looping menuconfig.
|
||||||
#test -s autoconf.h -a -s .config
|
#test -s $(TOPDIR)/autoconf.h -a -s .config
|
||||||
touch autoconf.h .config
|
touch $(TOPDIR)/autoconf.h .config
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include depend.mk
|
include $(MAKETOPDIR)/depend.mk
|
||||||
|
|
13
can/Makefile
13
can/Makefile
|
@ -1,13 +0,0 @@
|
||||||
TARGET = libcan.a
|
|
||||||
TOPDIR = ..
|
|
||||||
|
|
||||||
include $(TOPDIR)/defaults.mk
|
|
||||||
|
|
||||||
ifeq ($(CAN_SUPPORT),y)
|
|
||||||
SRC = can.c
|
|
||||||
SRC += borg_can.c
|
|
||||||
SRC += lap.c
|
|
||||||
SRC += spi.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
16
config.in
16
config.in
|
@ -22,7 +22,7 @@ endmenu
|
||||||
|
|
||||||
|
|
||||||
### Borg Hardware Menu ########################################################
|
### Borg Hardware Menu ########################################################
|
||||||
source borg_hw/config.in
|
source src/borg_hw/config.in
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
|
||||||
|
@ -36,22 +36,22 @@ endmenu
|
||||||
|
|
||||||
|
|
||||||
### Scrolltext Menu ###########################################################
|
### Scrolltext Menu ###########################################################
|
||||||
source scrolltext/config.in
|
source src/scrolltext/config.in
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
|
||||||
### RFM12 Menu ################################################################
|
### RFM12 Menu ################################################################
|
||||||
source rfm12/config.in
|
source src/rfm12/config.in
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
|
||||||
### Joystick Menu #############################################################
|
### Joystick Menu #############################################################
|
||||||
source joystick/config.in
|
source src/joystick/config.in
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
|
||||||
### CAN Menu ##################################################################
|
### CAN Menu ##################################################################
|
||||||
source can/config.in
|
source src/can/config.in
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
|
||||||
|
@ -62,15 +62,15 @@ depends on JOYSTICK_SUPPORT
|
||||||
|
|
||||||
|
|
||||||
### Game Menu #################################################################
|
### Game Menu #################################################################
|
||||||
source games/config.in
|
source src/games/config.in
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
|
||||||
### Animations Menu ###########################################################
|
### Animations Menu ###########################################################
|
||||||
source animations/config.in
|
source src/animations/config.in
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
|
||||||
### small Animations Menu #####################################################
|
### small Animations Menu #####################################################
|
||||||
source smallani/config.in
|
source src/smallani/config.in
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
26
defaults.mk
26
defaults.mk
|
@ -38,27 +38,27 @@ MACHINE = $(shell uname -m)
|
||||||
ifeq ($(findstring CYGWIN,$(OSTYPE)),CYGWIN)
|
ifeq ($(findstring CYGWIN,$(OSTYPE)),CYGWIN)
|
||||||
CFLAGS_SIM = -g -Wall -pedantic -std=c99 -O0 -D_WIN32 -D_XOPEN_SOURCE=600
|
CFLAGS_SIM = -g -Wall -pedantic -std=c99 -O0 -D_WIN32 -D_XOPEN_SOURCE=600
|
||||||
ifeq ($(MACHINE),x86_64)
|
ifeq ($(MACHINE),x86_64)
|
||||||
LDFLAGS_SIM = -T simulator/i386pep.x
|
LDFLAGS_SIM = -T ld_scripts/i386pep.x
|
||||||
else
|
else
|
||||||
LDFLAGS_SIM = -T simulator/i386pe.x
|
LDFLAGS_SIM = -T ld_scripts/i386pe.x
|
||||||
endif
|
endif
|
||||||
LIBS_SIM = -lgdi32 -lwinmm -lm
|
LIBS_SIM = -lgdi32 -lwinmm -lm
|
||||||
else
|
else
|
||||||
ifeq ($(OSTYPE),FreeBSD)
|
ifeq ($(OSTYPE),FreeBSD)
|
||||||
CFLAGS_SIM = -g -I/usr/local/include -Wall -pedantic -std=c99 -O0 -D_XOPEN_SOURCE=600
|
CFLAGS_SIM = -g -I/usr/local/include -Wall -pedantic -std=c99 -O0 -D_XOPEN_SOURCE=600
|
||||||
ifeq ($(MACHINE),amd64)
|
ifeq ($(MACHINE),amd64)
|
||||||
LDFLAGS_SIM = -L/usr/local/lib -T simulator/elf_x86_64_fbsd.x
|
LDFLAGS_SIM = -L/usr/local/lib -T ld_scripts/elf_x86_64_fbsd.x
|
||||||
else
|
else
|
||||||
LDFLAGS_SIM = -L/usr/local/lib -T simulator/elf_i386_fbsd.x
|
LDFLAGS_SIM = -L/usr/local/lib -T ld_scripts/elf_i386_fbsd.x
|
||||||
endif
|
endif
|
||||||
LIBS_SIM = -lglut -lpthread -lGL -lGLU -lm
|
LIBS_SIM = -lglut -lpthread -lGL -lGLU -lm
|
||||||
else
|
else
|
||||||
ifeq ($(OSTYPE),Linux)
|
ifeq ($(OSTYPE),Linux)
|
||||||
CFLAGS_SIM = -g -Wall -pedantic -std=c99 -O0 -D_XOPEN_SOURCE=600
|
CFLAGS_SIM = -g -Wall -pedantic -std=c99 -O0 -D_XOPEN_SOURCE=600
|
||||||
ifeq ($(MACHINE),x86_64)
|
ifeq ($(MACHINE),x86_64)
|
||||||
LDFLAGS_SIM = -g -T simulator/elf_x86_64.x
|
LDFLAGS_SIM = -T ld_scripts/elf_x86_64.x
|
||||||
else
|
else
|
||||||
LDFLAGS_SIM = -T simulator/elf_i386.x
|
LDFLAGS_SIM = -T ld_scripts/elf_i386.x
|
||||||
endif
|
endif
|
||||||
LIBS_SIM = -lglut -lpthread -lGL -lGLU -lm
|
LIBS_SIM = -lglut -lpthread -lGL -lGLU -lm
|
||||||
else
|
else
|
||||||
|
@ -78,12 +78,12 @@ $(TARGET):
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# include user's config.mk file
|
# include user's config.mk file
|
||||||
|
|
||||||
$(TOPDIR)/config.mk:
|
config.mk:
|
||||||
@echo "# Put your own config here!" > $@
|
@echo "# Put your own config here!" > $@
|
||||||
@echo "#F_CPU = $(F_CPU)" >> $@
|
@echo "#F_CPU = $(F_CPU)" >> $@
|
||||||
@echo "#MCU = $(MCU)" >> $@
|
@echo "#MCU = $(MCU)" >> $@
|
||||||
@echo "created default config.mk, tune your settings there!"
|
@echo "created default config.mk, tune your settings there!"
|
||||||
-include $(TOPDIR)/config.mk
|
-include config.mk
|
||||||
|
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
@ -93,15 +93,15 @@ ifneq ($(MAKECMDGOALS),clean)
|
||||||
ifneq ($(MAKECMDGOALS),mrproper)
|
ifneq ($(MAKECMDGOALS),mrproper)
|
||||||
ifneq ($(MAKECMDGOALS),menuconfig)
|
ifneq ($(MAKECMDGOALS),menuconfig)
|
||||||
|
|
||||||
include $(TOPDIR)/.config
|
include $(MAKETOPDIR)/.config
|
||||||
|
|
||||||
CPPFLAGS += -DF_CPU=$(FREQ)UL -mmcu=$(MCU)
|
CPPFLAGS += -DF_CPU=$(FREQ)UL -mmcu=$(MCU)
|
||||||
|
|
||||||
# flags for the linker
|
# flags for the linker
|
||||||
ifeq ($(findstring atmega128,$(MCU)),atmega128)
|
ifeq ($(findstring atmega128,$(MCU)),atmega128)
|
||||||
LDFLAGS += -T ./avr51.x -Wl,-Map,image.map -mmcu=$(MCU)
|
LDFLAGS += -T ld_scripts/avr51.x -Wl,-Map,image.map -mmcu=$(MCU)
|
||||||
else
|
else
|
||||||
LDFLAGS += -T ./avr5.x -Wl,-Map,image.map -mmcu=$(MCU)
|
LDFLAGS += -T ld_scripts/avr5.x -Wl,-Map,image.map -mmcu=$(MCU)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
endif # MAKECMDGOALS!=menuconfig
|
endif # MAKECMDGOALS!=menuconfig
|
||||||
|
@ -109,8 +109,8 @@ endif # MAKECMDGOALS!=mrproper
|
||||||
endif # MAKECMDGOALS!=clean
|
endif # MAKECMDGOALS!=clean
|
||||||
|
|
||||||
ifeq ($(BOOTLOADER_SUPPORT),y)
|
ifeq ($(BOOTLOADER_SUPPORT),y)
|
||||||
LDFLAGS += -Wl,--section-start=.text=0xE000
|
LDFLAGS += -Wl,--section-start=.text=0xE000
|
||||||
CFLAGS += -mcall-prologues
|
CFLAGS += -mcall-prologues
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
TARGET =
|
|
||||||
TOPDIR = ../..
|
|
||||||
|
|
||||||
include $(TOPDIR)/defaults.mk
|
|
||||||
|
|
||||||
ifeq ($(GAME_BREAKOUT),y)
|
|
||||||
SRC = breakout.c playfield.c rebound.c score.c level.c ball.c messages.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
|
@ -1,22 +0,0 @@
|
||||||
|
|
||||||
ifeq ($(GAME_TETRIS_CORE),y)
|
|
||||||
SUBDIRS += games/tetris
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(GAME_SPACE_INVADERS),y)
|
|
||||||
SUBDIRS += games/space_invaders
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(GAME_SNAKE),y)
|
|
||||||
SUBDIRS += games/snake
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(ANIMATION_SNAKE),y)
|
|
||||||
ifneq ($(GAME_SNAKE),y)
|
|
||||||
SUBDIRS += games/snake
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(GAME_BREAKOUT),y)
|
|
||||||
SUBDIRS += games/breakout
|
|
||||||
endif
|
|
|
@ -1,8 +0,0 @@
|
||||||
TARGET =
|
|
||||||
TOPDIR = ../..
|
|
||||||
|
|
||||||
include $(TOPDIR)/defaults.mk
|
|
||||||
|
|
||||||
SRC = snake_game.c
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
|
@ -1,8 +0,0 @@
|
||||||
TARGET =
|
|
||||||
TOPDIR = ../..
|
|
||||||
|
|
||||||
include $(TOPDIR)/defaults.mk
|
|
||||||
|
|
||||||
SRC = invader_init.c invader_draw.c invader_proc.c invaders2.c
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
|
@ -1,9 +0,0 @@
|
||||||
TARGET = libanimations.a
|
|
||||||
TOPDIR = ..
|
|
||||||
|
|
||||||
include $(TOPDIR)/defaults.mk
|
|
||||||
|
|
||||||
SRC = menu.c
|
|
||||||
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
|
@ -1,8 +0,0 @@
|
||||||
TARGET = objects
|
|
||||||
TOPDIR = ..
|
|
||||||
|
|
||||||
include $(TOPDIR)/defaults.mk
|
|
||||||
|
|
||||||
SRC = rfm12.c borg_rfm12.c
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
11
rules.mk
11
rules.mk
|
@ -1,5 +1,3 @@
|
||||||
|
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# rules for buildung AVR objects
|
# rules for buildung AVR objects
|
||||||
|
|
||||||
|
@ -35,17 +33,14 @@ objects_sim: $(OBJECTS_SIM)
|
||||||
@ if [ ! -d obj_sim ]; then mkdir obj_sim ; fi
|
@ if [ ! -d obj_sim ]; then mkdir obj_sim ; fi
|
||||||
@ echo $(OBJECTS_SIM) > obj_sim/.objects
|
@ echo $(OBJECTS_SIM) > obj_sim/.objects
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
clean-common:
|
clean-common:
|
||||||
$(RM) $(TARGET) *.[odasE] *.d.new *~
|
$(RM) $(TARGET) *.[odasE] *.d.new *~
|
||||||
$(RM) -r ./obj_avr
|
$(RM) -r obj_avr
|
||||||
$(RM) -r ./obj_sim
|
$(RM) -r obj_sim
|
||||||
|
|
||||||
clean: clean-common
|
clean: clean-common
|
||||||
|
|
||||||
all:
|
all:
|
||||||
$(MAKE) -C $(TOPDIR) all
|
$(MAKE) -C $(TOPDIR) all
|
||||||
|
|
||||||
include $(TOPDIR)/depend.mk
|
#include depend.mk
|
||||||
|
|
|
@ -1564,7 +1564,7 @@ save_configuration () {
|
||||||
echo -n "."
|
echo -n "."
|
||||||
|
|
||||||
DEF_CONFIG="${1:-.config}"
|
DEF_CONFIG="${1:-.config}"
|
||||||
DEF_CONFIG_H="autoconf.h"
|
DEF_CONFIG_H="src/autoconf.h"
|
||||||
|
|
||||||
CONFIG=.tmpconfig
|
CONFIG=.tmpconfig
|
||||||
CONFIG_H=.tmpconfig.h
|
CONFIG_H=.tmpconfig.h
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
TARGET = objects
|
|
||||||
TOPDIR = ..
|
|
||||||
|
|
||||||
include $(TOPDIR)/defaults.mk
|
|
||||||
|
|
||||||
SRC = scrolltext3.c
|
|
||||||
|
|
||||||
SRC += $(shell echo $(SCROLLTEXT_FONT) | tr A-Z a-z).c
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
|
@ -1,7 +1,8 @@
|
||||||
TARGET = libanimations.a
|
MAKETOPDIR = ../..
|
||||||
TOPDIR = ..
|
|
||||||
|
|
||||||
include $(TOPDIR)/defaults.mk
|
TARGET = libanimations.a
|
||||||
|
|
||||||
|
include $(MAKETOPDIR)/defaults.mk
|
||||||
|
|
||||||
SRC = program.c
|
SRC = program.c
|
||||||
|
|
||||||
|
@ -53,4 +54,6 @@ ifeq ($(ANIMATION_TIME),y)
|
||||||
SRC += borg_time.c
|
SRC += borg_time.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
include $(MAKETOPDIR)/rules.mk
|
||||||
|
|
||||||
|
include $(MAKETOPDIR)/depend.mk
|
|
@ -1,6 +1,6 @@
|
||||||
TOPDIR = ../..
|
MAKETOPDIR = ../../..
|
||||||
|
|
||||||
include $(TOPDIR)/defaults.mk
|
include $(MAKETOPDIR)/defaults.mk
|
||||||
|
|
||||||
ifeq ($(ANIMATION_BMSCROLLER),y)
|
ifeq ($(ANIMATION_BMSCROLLER),y)
|
||||||
SRC = bitmapscroller.c
|
SRC = bitmapscroller.c
|
||||||
|
@ -22,4 +22,6 @@ ifeq ($(ANIMATION_FAIRYDUST),y)
|
||||||
SRC += fairydust.c
|
SRC += fairydust.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
include $(MAKETOPDIR)/rules.mk
|
||||||
|
|
||||||
|
include $(MAKETOPDIR)/depend.mk
|
|
@ -49,7 +49,7 @@ comment "Animations"
|
||||||
int "Request Timeout (ms)" TIME_UPDATE_TIMEOUT 50
|
int "Request Timeout (ms)" TIME_UPDATE_TIMEOUT 50
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
source animations/bitmapscroller/config.in
|
source src/animations/bitmapscroller/config.in
|
||||||
|
|
||||||
mainmenu_option next_comment
|
mainmenu_option next_comment
|
||||||
comment "Fixed-point math patterns"
|
comment "Fixed-point math patterns"
|
|
@ -1,9 +1,10 @@
|
||||||
|
MAKETOPDIR = ../..
|
||||||
|
|
||||||
TARGET = libborg_hw.a
|
TARGET = libborg_hw.a
|
||||||
TOPDIR = ..
|
|
||||||
|
|
||||||
SRC_SIM :=
|
SRC_SIM :=
|
||||||
|
|
||||||
include $(TOPDIR)/defaults.mk
|
include $(MAKETOPDIR)/defaults.mk
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(BORG_HW),HW_BORG_16)
|
ifeq ($(BORG_HW),HW_BORG_16)
|
||||||
|
@ -66,4 +67,6 @@ ifeq ($(SRC),'')
|
||||||
$(error no valid hardware driver selected )
|
$(error no valid hardware driver selected )
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
include $(MAKETOPDIR)/rules.mk
|
||||||
|
|
||||||
|
include $(MAKETOPDIR)/depend.mk
|
|
@ -26,59 +26,59 @@ choice 'Hardware Driver' \
|
||||||
|
|
||||||
|
|
||||||
if [ "$BORG_HW" == "HW_BORG_16" ] ; then
|
if [ "$BORG_HW" == "HW_BORG_16" ] ; then
|
||||||
source borg_hw/config_borg16.in
|
source src/borg_hw/config_borg16.in
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$BORG_HW" == "HW_BORG_16_HGM" ] ; then
|
if [ "$BORG_HW" == "HW_BORG_16_HGM" ] ; then
|
||||||
source borg_hw/config_borg16_hgmod.in
|
source src/borg_hw/config_borg16_hgmod.in
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$BORG_HW" == "HW_BORG_ANDRE" ] ; then
|
if [ "$BORG_HW" == "HW_BORG_ANDRE" ] ; then
|
||||||
source borg_hw/config_andreborg.in
|
source src/borg_hw/config_andreborg.in
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$BORG_HW" == "HW_BORG_LS" ] ; then
|
if [ "$BORG_HW" == "HW_BORG_LS" ] ; then
|
||||||
source borg_hw/config_borg_ls.in
|
source src/borg_hw/config_borg_ls.in
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$BORG_HW" == "HW_BORG_MH" ] ; then
|
if [ "$BORG_HW" == "HW_BORG_MH" ] ; then
|
||||||
source borg_hw/config_borg_mh.in
|
source src/borg_hw/config_borg_mh.in
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$BORG_HW" == "HW_BORG_LSJO" ] ; then
|
if [ "$BORG_HW" == "HW_BORG_LSJO" ] ; then
|
||||||
source borg_hw/config_borg_lsjo.in
|
source src/borg_hw/config_borg_lsjo.in
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$BORG_HW" == "HW_LEDBRETT" ] ; then
|
if [ "$BORG_HW" == "HW_LEDBRETT" ] ; then
|
||||||
source borg_hw/config_ledbrett.in
|
source src/borg_hw/config_ledbrett.in
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$BORG_HW" == "HW_BORG_MINI" ] ; then
|
if [ "$BORG_HW" == "HW_BORG_MINI" ] ; then
|
||||||
source borg_hw/config_borg_mini.in
|
source src/borg_hw/config_borg_mini.in
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$BORG_HW" == "HW_PANEL_ONE" ] ; then
|
if [ "$BORG_HW" == "HW_PANEL_ONE" ] ; then
|
||||||
source borg_hw/config_panel_one.in
|
source src/borg_hw/config_panel_one.in
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$BORG_HW" == "HW_PD1165" ] ; then
|
if [ "$BORG_HW" == "HW_PD1165" ] ; then
|
||||||
source borg_hw/config_pd1165.in
|
source src/borg_hw/config_pd1165.in
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$BORG_HW" == "HW_PINGPONG" ] ; then
|
if [ "$BORG_HW" == "HW_PINGPONG" ] ; then
|
||||||
source borg_hw/config_pingpong.in
|
source src/borg_hw/config_pingpong.in
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$BORG_HW" == "HW_ROTOR" ] ; then
|
if [ "$BORG_HW" == "HW_ROTOR" ] ; then
|
||||||
source borg_hw/config_rotor.in
|
source src/borg_hw/config_rotor.in
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$BORG_HW" == "HW_GIGABORG" ] ; then
|
if [ "$BORG_HW" == "HW_GIGABORG" ] ; then
|
||||||
source borg_hw/config_gigaborg.in
|
source src/borg_hw/config_gigaborg.in
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$BORG_HW" == "HW_ANCIENTBORG" ] ; then
|
if [ "$BORG_HW" == "HW_ANCIENTBORG" ] ; then
|
||||||
source borg_hw/config_ancient.in
|
source src/borg_hw/config_ancient.in
|
||||||
fi
|
fi
|
||||||
|
|
||||||
endmenu
|
endmenu
|
|
@ -0,0 +1,16 @@
|
||||||
|
MAKETOPDIR = ../..
|
||||||
|
|
||||||
|
TARGET = libcan.a
|
||||||
|
|
||||||
|
include $(MAKETOPDIR)/defaults.mk
|
||||||
|
|
||||||
|
ifeq ($(CAN_SUPPORT),y)
|
||||||
|
SRC = can.c
|
||||||
|
SRC += borg_can.c
|
||||||
|
SRC += lap.c
|
||||||
|
SRC += spi.c
|
||||||
|
endif
|
||||||
|
|
||||||
|
include $(MAKETOPDIR)/rules.mk
|
||||||
|
|
||||||
|
include $(MAKETOPDIR)/depend.mk
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue