Commit f445444b authored by Federico Vaga's avatar Federico Vaga

Makefile: complete {tools|lib}/Makefile

* add installation rules
* use variables for repeated names
* add EXTRAFCLAGS to allow cross-compilation 32/64 bit
Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 6266f55a
......@@ -6,7 +6,7 @@ ZIO ?= ../zio
LIB = libfmctdc.a
LOBJ := fmctdc-lib.o
CFLAGS = -Wall -ggdb -O2 -I../kernel -I$(ZIO)/include
CFLAGS = -Wall -ggdb -O2 -I../kernel -I$(ZIO)/include $(EXTRACFLAGS)
DESTDIR ?= /usr/local
......
DESTDIR ?= /usr/local/
LIBTDC = ../lib/
TESTS = fmc-tdc-list \
fmc-tdc-term \
fmc-tdc-read \
......@@ -5,10 +8,10 @@ TESTS = fmc-tdc-list \
fmc-tdc-temperature \
fmc-tdc-time
CFLAGS = -I. -I../lib -I../kernel -Wall
CFLAGS = -I. -I$(LIBTDC) -I../kernel -Wall $(EXTRACFLAGS)
COMMON_SRCS = test-common.c
LDFLAGS = -L../lib -lfmctdc
LDFLAGS = -L$(LIBTDC) -lfmctdc
all: $(TESTS)
......@@ -17,4 +20,11 @@ all: $(TESTS)
clean:
rm -f $(TESTS) test-common.o
\ No newline at end of file
rm -f $(TESTS) test-common.o
# make nothing for modules_install, but avoid errors
modules_install:
install:
install -d $(DESTDIR)/bin
install -D $(TESTS) $(DESTDIR)/bin
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment