summaryrefslogtreecommitdiff
path: root/packages/neuros-pkggen/files/Makefile
diff options
context:
space:
mode:
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