summaryrefslogtreecommitdiff
path: root/packages/neuros-pkggen/files/Makefile
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2008-07-07 20:45:00 +0000
committerKoen Kooi <koen@openembedded.org>2008-07-07 20:45:00 +0000
commitf556eb47ca170da06fc44bc6ea96e41d1e2f496d (patch)
tree3a1f8ec46a8c4d8a657a3b6b22612be08e743331 /packages/neuros-pkggen/files/Makefile
parentde146d9244042609a485b4906ffdcf57864c0f07 (diff)
neuros-pkggen native: add tool to generate ready to flash upk images
Diffstat (limited to 'packages/neuros-pkggen/files/Makefile')
-rw-r--r--packages/neuros-pkggen/files/Makefile68
1 files changed, 68 insertions, 0 deletions
diff --git a/packages/neuros-pkggen/files/Makefile b/packages/neuros-pkggen/files/Makefile
new file mode 100644
index 0000000000..fed6835d06
--- /dev/null
+++ b/packages/neuros-pkggen/files/Makefile
@@ -0,0 +1,68 @@
+# * Copyright(C) 2007 Neuros Technology International LLC.
+# * <www.neurostechnology.com>
+# *
+# * ubootcmd application make file..............TQ 2007-02-05
+
+
+# include system config
+include config
+
+
+# executable name
+NT_PACKET := packet_osd2
+
+
+# project directories
+PACKET_DIR_ROOT := .
+
+# compiler flags
+CFLAGS += $(DEFINES) -Wall -Werror
+
+# object files
+OBJS := package.o crc32.o
+
+# build all
+.PHONY: all
+all: $(NT_PACKET)
+
+$(NT_PACKET): $(OBJS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS)
+
+# install
+install: $(NT_PACKET)
+ @echo
+ @echo "Installing $(NT_PACKET) ... "
+ @cp $(NT_PACKET) $(BSP_ROOT)/images/
+ @echo
+
+# clean up project
+.PHONY: clean
+
+clean:
+ @echo
+ @rm -f $(NT_PACKET)
+ @for dir in $(PACKET_DIR_ROOT); do \
+ echo "Entering $$dir ..."; \
+ for file in $$dir/*~ $$dir/*.o $$dir/*.d; do \
+ if [ -f $$file ]; then \
+ echo "removing $$file"; \
+ rm $$file; \
+ fi; \
+ done; \
+ done
+ @echo
+
+# include the C include dependencies
+-include $(OBJS:.o=.d)
+
+
+# calculate C inlcude dependencies
+%.d: %.c
+ @set -e; rm -f $@; \
+ $(CC) -MM $(CFLAGS) $< > $@.$$$$; \
+ sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
+ rm -f $@.$$$$
+
+
+# include make rules.
+include Makefile.rules