summaryrefslogtreecommitdiff
path: root/package/mopd/src/mopchk/Makefile
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2017-04-28 19:47:09 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2017-04-28 19:48:09 +0200
commit591fd60492abf36e4c07d349b836ff40228df09e (patch)
treee63e37f3f654653837cf20c2a4a1aa551c5ba4f5 /package/mopd/src/mopchk/Makefile
parentab6faa1d0e25a9304d37badf324bddce47caced2 (diff)
mopd: add new package for alpha netboot
Diffstat (limited to 'package/mopd/src/mopchk/Makefile')
-rw-r--r--package/mopd/src/mopchk/Makefile23
1 files changed, 23 insertions, 0 deletions
diff --git a/package/mopd/src/mopchk/Makefile b/package/mopd/src/mopchk/Makefile
new file mode 100644
index 000000000..3aef3c10c
--- /dev/null
+++ b/package/mopd/src/mopchk/Makefile
@@ -0,0 +1,23 @@
+OBJS=mopchk.o
+INCL=-I../ -I../common
+LIBS=../common/libcommon.a
+
+all: mopchk
+
+mopchk: ${OBJS} version.o $(LIBS)
+ $(CC) -o mopchk version.o ${OBJS} ${LIBS}
+
+.c.o: .c
+ $(CC) -c $(CFLAGS) ${INCL} $<
+
+clean:
+ rm -f *.o *~ mopchk VERSION version.*
+
+version.o: version.c
+version.c version.h:
+ ln -sf ../common/VERSION VERSION
+ rm -f version.c ; sed 's/.*/char version[] = "&";/' VERSION > version.c
+ set `sed 's/\([0-9]*\)\.\([0-9]*\).*/\1 \2/' VERSION` ; \
+ { echo '#define VERSION_MAJOR' $$1 ; \
+ echo '#define VERSION_MINOR' $$2 ; } > version.h
+