projects
/
simavr
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
watchdog: Fix register naming
[simavr]
/
simavr
/
Makefile
diff --git
a/simavr/Makefile
b/simavr/Makefile
index
f701b0b
..
d805820
100644
(file)
--- a/
simavr/Makefile
+++ b/
simavr/Makefile
@@
-16,13
+16,17
@@
# You should have received a copy of the GNU General Public License
# along with simavr. If not, see <http://www.gnu.org/licenses/>.
# You should have received a copy of the GNU General Public License
# along with simavr. If not, see <http://www.gnu.org/licenses/>.
-SIMAVR_VERSION = ${shell git tag |tail -1|sed 's/[^0-9]*//'}
+SHELL := ${shell which bash}
+SIMAVR_VERSION := ${shell \
+ { git log -1 --tags --simplify-by-decoration --pretty="format:%d"|\
+ sed -e 's/[\(\) ]//g'; } || \
+ echo "unknown" }
SIMAVR_REVISION = 2
target = run_avr
CFLAGS += -Werror
SIMAVR_REVISION = 2
target = run_avr
CFLAGS += -Werror
-# tracing i
d
useful especialy if you develop simavr core.
+# tracing i
s
useful especialy if you develop simavr core.
# it otherwise eat quite a bit of few cycles, even disabled
#CFLAGS += -DCONFIG_SIMAVR_TRACE=1
# it otherwise eat quite a bit of few cycles, even disabled
#CFLAGS += -DCONFIG_SIMAVR_TRACE=1
@@
-30,9
+34,9
@@
all: obj config libsimavr ${target}
include ../Makefile.common
include ../Makefile.common
-cores = ${wildcard cores/*.c}
-sim = ${wildcard sim/sim_*.c} ${wildcard sim/avr_*.c}
-sim_o = ${patsubst sim/%.c, ${OBJ}/%.o, ${sim}}
+cores
:
= ${wildcard cores/*.c}
+sim
:
= ${wildcard sim/sim_*.c} ${wildcard sim/avr_*.c}
+sim_o
:
= ${patsubst sim/%.c, ${OBJ}/%.o, ${sim}}
VPATH = cores
VPATH += sim
VPATH = cores
VPATH += sim
@@
-40,7
+44,6
@@
VPATH += sim
IPATH = sim
IPATH += .
IPATH += ../../shared
IPATH = sim
IPATH += .
IPATH += ../../shared
-IPATH += ../include
#
# Static library
#
# Static library
@@
-80,18
+83,21
@@
${target} : ${OBJ}/${target}.elf
clean: clean-${OBJ}
rm -rf ${target} *.a *.so
clean: clean-${OBJ}
rm -rf ${target} *.a *.so
+ rm -f sim_core_*.h
DESTDIR = /usr/local
PREFIX = ${DESTDIR}
install : all
$(MKDIR) $(DESTDIR)/include/simavr/avr
DESTDIR = /usr/local
PREFIX = ${DESTDIR}
install : all
$(MKDIR) $(DESTDIR)/include/simavr/avr
- $(INSTALL) sim/*.h $(DESTDIR)/include/simavr/
- $(INSTALL) sim_core_*.h $(DESTDIR)/include/simavr/
- $(INSTALL)
../include
/*.h $(DESTDIR)/include/simavr/avr/
+ $(INSTALL)
-m644
sim/*.h $(DESTDIR)/include/simavr/
+ $(INSTALL)
-m644
sim_core_*.h $(DESTDIR)/include/simavr/
+ $(INSTALL)
-m644 sim/avr
/*.h $(DESTDIR)/include/simavr/avr/
$(MKDIR) $(DESTDIR)/lib
$(INSTALL) ${OBJ}/libsimavr.a $(DESTDIR)/lib/
$(MKDIR) $(DESTDIR)/lib/pkgconfig/
$(MKDIR) $(DESTDIR)/lib
$(INSTALL) ${OBJ}/libsimavr.a $(DESTDIR)/lib/
$(MKDIR) $(DESTDIR)/lib/pkgconfig/
+ sed -e "s|PREFIX|${PREFIX}|g" -e "s|VERSION|${SIMAVR_VERSION}|g" \
+ simavr-avr.pc >$(DESTDIR)/lib/pkgconfig/simavr-avr.pc
sed -e "s|PREFIX|${PREFIX}|g" -e "s|VERSION|${SIMAVR_VERSION}|g" \
simavr.pc >$(DESTDIR)/lib/pkgconfig/simavr.pc
ifeq (${shell uname}, Linux)
sed -e "s|PREFIX|${PREFIX}|g" -e "s|VERSION|${SIMAVR_VERSION}|g" \
simavr.pc >$(DESTDIR)/lib/pkgconfig/simavr.pc
ifeq (${shell uname}, Linux)
@@
-107,7
+113,7
@@
endif
# in simavr officialy, this section shall diseapear
debian:
rm -rf /tmp/simavr-tmp && mkdir -p /tmp/simavr-tmp/usr && \
# in simavr officialy, this section shall diseapear
debian:
rm -rf /tmp/simavr-tmp && mkdir -p /tmp/simavr-tmp/usr && \
- make
install DESTDIR=/tmp/simavr-tmp/usr
&& \
+ make
cleam; make install DESTDIR=/tmp/simavr-tmp/usr RELEASE=1
&& \
(cd /tmp/simavr-tmp && \
fpm -s dir -t deb -C /tmp/simavr-tmp -n libsimavr -v $(SIMAVR_VERSION) \
--iteration $(SIMAVR_REVISION) \
(cd /tmp/simavr-tmp && \
fpm -s dir -t deb -C /tmp/simavr-tmp -n libsimavr -v $(SIMAVR_VERSION) \
--iteration $(SIMAVR_REVISION) \
@@
-158,6
+164,7
@@
sim_core_config.h ${OBJ}/cores.deps: $(cores) Makefile
done ; \
( printf "// Autogenerated do not edit\n"; \
printf "#ifndef __SIM_CORE_CONFIG_H__\n#define __SIM_CORE_CONFIG_H__\n\n"; \
done ; \
( printf "// Autogenerated do not edit\n"; \
printf "#ifndef __SIM_CORE_CONFIG_H__\n#define __SIM_CORE_CONFIG_H__\n\n"; \
+ printf "#define CONFIG_SIMAVR_VERSION \"${SIMAVR_VERSION}\"\n"; \
printf "$$conf\n"; \
printf "#endif\n"; \
) >sim_core_config.h
printf "$$conf\n"; \
printf "#endif\n"; \
) >sim_core_config.h