]> jspc29.x-matter.uni-frankfurt.de Git - trbnettools.git/commitdiff
updated make
authorhadaq <hadaq>
Wed, 18 Jul 2012 02:49:39 +0000 (02:49 +0000)
committerhadaq <hadaq>
Wed, 18 Jul 2012 02:49:39 +0000 (02:49 +0000)
HOWTO_COMPILE.TXT [new file with mode: 0644]
Makefile
libtrbnet_perl/makefile [new file with mode: 0644]
pexor/Makefile

diff --git a/HOWTO_COMPILE.TXT b/HOWTO_COMPILE.TXT
new file mode 100644 (file)
index 0000000..a1269d5
--- /dev/null
@@ -0,0 +1,12 @@
+compile for old Etrax-Board
+ make distclean
+ make ETRAX=1
+
+compile for Pexor Card
+ make distclean
+ make PEXOR=1
+
+compile for old Etrax-Board
+ make distclean
+ make TRB3=1
+
index 7cc58d9f117d66fa8f29786635bae4217baf1155..4b75140205da65f12c7fa5d5cb5c5d000f059387 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,17 +1,34 @@
 # ------------ TARGETS -------------------------------------------------
 
-TARGETS = libtrbnet trbrich trbnetd pexor
+ifdef ETRAX
+TARGETS = libtrbnet trbrich
+else ifdef PEXOR
+TARGETS = libtrbnet trbrich trbnetd pexor perllib
+else ifdef TRB3
+TARGETS = libtrbnet trbrich trbnetd perllib
+else
+TARGETS = usage
+endif
 
 # ------------ Targets -------------------------------------------------
 
 all: $(TARGETS)
 
+
+.PHONY: usage
+usage:
+       @echo " for compiling/install you have to define a target, i.e."
+       @echo "    make ETRAX=1  or"
+       @echo "    make PEXOR=1  or"
+       @echo "    make TRB3=1"
+
 .PHONY: clean 
 clean:
        make -C libtrbnet clean
        make -C pexor clean
        make -C trbrich clean
        make -C trbnetd clean
+       make -C libtrbnet_perl clean
 
 .PHONY: distclean
 distclean: clean
@@ -19,6 +36,7 @@ distclean: clean
        make -C pexor distclean
        make -C trbrich distclean
        make -C trbnetd distclean
+       make -C libtrbnet_perl distclean
        rm -rf  bin binlocal lib liblocal include kernel-modules
 
 .PHONY: cleanrpc
@@ -29,11 +47,29 @@ cleanrpc:
 depend:
        $(CC) -MM $(CFLAGS) $(CPPFLAGS) $(INCDIR) *.c
 
-install: pexor libtrbnet trbrich trbnetd
+.PHONY: install
+ifdef ETRAX
+install: libtrbnet trbrich
        make -C libtrbnet install
+       make -C trbrich install
+else ifdef PEXOR
+install: libtrbnet trbrich trbnetd pexor
+       make -C libtrbnet install
+       make -C trbrich install
+       make -C trbnetd install
        make -C pexor install
+       make -C libtrbnet_perl install
+else ifdef TRB3
+install: libtrbnet trbrich trbnetd
+       make -C libtrbnet install
        make -C trbrich install
        make -C trbnetd install
+       make -C libtrbnet_perl install
+else
+install:
+       make usage
+endif
+
 
 # ------------ Dependencies --------------------------------------------
 
@@ -52,3 +88,7 @@ trbrich: libtrbnet
 .PHONY: trbnetd
 trbnetd: libtrbnet
        make -C trbnetd all
+
+.PHONY: perllib
+perllib: libtrbnet 
+       make -C libtrbnet_perl all
diff --git a/libtrbnet_perl/makefile b/libtrbnet_perl/makefile
new file mode 100644 (file)
index 0000000..6023783
--- /dev/null
@@ -0,0 +1,24 @@
+
+TARGETS = 
+
+# ------------ Targets -------------------------------------------------
+
+all: Makefile
+       make -f Makefile
+
+.PHONY: clean
+clean: Makefile
+       make -f Makefile clean
+
+.PHONY: distclean
+distclean: clean
+
+.PHONY: install
+install: Makefile
+       make -f Makefile install
+
+# ------------ Dependencies --------------------------------------------
+
+Makefile:
+       perl Makefile.PL
+
index b6991a5ce78695c8697acd1fdfec6daea69753c5..9139458379e8a08fc3766a36f38cdbf33fa27eff 100644 (file)
@@ -23,7 +23,7 @@ LOADLIBES = -ltrbnet -lm
 
 # ------------ TARGETS -------------------------------------------------
 
-TARGETS = pexorflash
+TARGETS = pexorflash kernel-driver
 
 LIB_TARGETS =
 
@@ -86,12 +86,16 @@ distclean: clean
 depend:
        $(CC) -MM $(CFLAGS) $(CPPFLAGS) $(INCDIR) *.c
 
-install: $(TARGETS)
+install: pexorflash kernel-driver
        mkdir -m 2775 -p ../binlocal/
-       install -m 775 $(TARGETS) ../binlocal/
+       install -m 775 pexorflash ../binlocal/
        make -C kernel-module install
 
 # ------------ Dependencies --------------------------------------------
 
 pexorflash: pexorflash.o
 pexorflash.o: pexorflash.c 
+
+.PHONY: kernel-driver
+kernel-driver:
+       make -C kernel-module