<commit_before>#
# (C) Copyright 2000-2004
# <NAME>, DENX Software Engineering, <EMAIL>.
#
# See file CREDITS for list of people who contributed to this
# project.
#
# 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 2 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, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
#

# Deal with colliding definitions from tcsh etc.
VENDOR=

#########################################################################

TOPDIR	:= $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
export	TOPDIR
ARCH  = arm
CPU   = arm7tdmi-s
export	ARCH CPU VENDOR

#CROSS_COMPILE = arm-unknown-linux-gnu-
#CROSS_COMPILE = arm-softfloat-linux-gnu-
#export	CROSS_COMPILE

# load other configuration
include $(TOPDIR)/config.mk

#########################################################################
# blink objects....order is important (i.e. start must be first)

AOBJS = 
COBJS = $(patsubst %.c,%.o,$(wildcard src/*.c))
TESTS = $(wildcard tests/*.c)
TARGETS = $(patsubst %.c,%.o,$(TESTS))
#TARGETS = tests/blink-white.o 

# Add GCC lib
PLATFORM_LIBS += --no-warn-mismatch -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc

#########################################################################

#ALL = blink.srec blink.bin blink.dis blink.System.map
ALL = $(TESTS:.c=.srec) $(TESTS:.c=.bin) $(TESTS:.c=.dis) 

.PRECIOUS: 	$(COBJS) $(TARGETS) $(TESTS:.c=.obj)

all:		$(ALL)

%.srec:		%.obj
		$(OBJCOPY) ${OBJCFLAGS} -O srec $< $@

%.ihex: 	%.obj
		$(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@

%.bin:		%.obj
		$(OBJCOPY) ${OBJCFLAGS} -O binary $< $@

%.dis:		%.obj
		$(OBJDUMP) -DS $< > $@

%.obj:		$(AOBJS) $(COBJS) $(TARGETS) $(LDSCRIPT)
		$(LD) $(LDFLAGS) $(AOBJS) \
			--start-group $(PLATFORM_LIBS) --end-group \
			-Map $*.map $*.o $< -o $@


%.System.map:	%.obj
		@$(NM) $< | \
		grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
		sort > $*.System.map


#########################################################################

.depend:	Makefile $(AOBJS:.o=.S) $(COBJS:.o=.c)
		$(CC) -M $(CFLAGS) $(AOBJS:.o=.S) $(COBJS:.o=.c) > $@

sinclude .depend

#########################################################################

clean:
	find . -type f \<commit_msg>ok. I think this is right.<commit_after>#
# (C) Copyright 2000-2004
# <NAME>, DENX Software Engineering, <EMAIL>.
#
# See file CREDITS for list of people who contributed to this
# project.
#
# 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 2 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, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
#

# Deal with colliding definitions from tcsh etc.
VENDOR=

#########################################################################

TOPDIR	:= $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
export	TOPDIR
ARCH  = arm
CPU   = arm7tdmi-s
export	ARCH CPU VENDOR

#CROSS_COMPILE = arm-unknown-linux-gnu-
#CROSS_COMPILE = arm-softfloat-linux-gnu-
#export	CROSS_COMPILE

# load other configuration
include $(TOPDIR)/config.mk

#########################################################################
# blink objects....order is important (i.e. start must be first)

AOBJS = 
COBJS = $(patsubst %.c,%.o,$(wildcard src/*.c))
TESTS = $(wildcard tests/*.c)
TARGETS = $(patsubst %.c,%.o,$(TESTS))
#TARGETS = tests/blink-white.o 

# Add GCC lib
PLATFORM_LIBS += --no-warn-mismatch -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc

#########################################################################

#ALL = blink.srec blink.bin blink.dis blink.System.map
ALL = $(TESTS:.c=.srec) $(TESTS:.c=.bin) $(TESTS:.c=.dis) 

.PRECIOUS: 	$(COBJS) $(TARGETS) $(TESTS:.c=.obj)

all:		$(ALL)

tests/nvm-read.obj: src/maca.o
tests/rftest-rx.obj: src/maca.o
tests/rftest-tx.obj: src/maca.o

%.srec:		%.obj
		$(OBJCOPY) ${OBJCFLAGS} -O srec $< $@

%.ihex: 	%.obj
		$(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@

%.bin:		%.obj
		$(OBJCOPY) ${OBJCFLAGS} -O binary $< $@

%.dis:		%.obj
		$(OBJDUMP) -DS $< > $@

%.obj:		$(LDSCRIPT) %.o
	echo $*.o
		$(LD) $(LDFLAGS) $(AOBJS) \
			--start-group $(PLATFORM_LIBS) --end-group \
			-Map $*.map $^ -o $@


%.System.map:	%.obj
		@$(NM) $< | \
		grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
		sort > $*.System.map


#########################################################################

.depend:	Makefile $(AOBJS:.o=.S) $(COBJS:.o=.c)
		$(CC) -M $(CFLAGS) $(AOBJS:.o=.S) $(COBJS:.o=.c) > $@

sinclude .depend

#########################################################################

clean:
	find . -type f \
{'fraction_non_alphanumeric': 0.28714788732394364, 'fraction_numerical': 0.008450704225352112, 'mean_word_length': 4.058771148708816, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '428457', 'n_tokens_mistral': 2105, 'n_tokens_neox': 1921, 'n_words': 578}