Home | History | Annotate | Download | only in tests
      1 SRC=\
      2 	perf_unittest.c
      3 
      4 HSRC=$(wildcard ../inc/*)
      5 
      6 
      7 
      8 OBJ=$(SRC:.c=.o)
      9 
     10 include $(OMXROOT)/Master.mk
     11 
     12 CFLAGS+=-I../inc -I$(OMXINCLUDEDIR) -Wall -fpic -pipe -D__PERF_UNIT_TEST__
     13 # optimization flags
     14 CFLAGS += -O2
     15 
     16 COMPONENT_LIB=$(OMXLIBDIR)/lib$(OMXPERFLIB).so
     17 COMPONENT_TEST=PERF_test
     18 
     19 COMPONENT_TARGET=$(OMXTESTDIR)/$(COMPONENT_TEST)
     20 
     21 all install:: $(COMPONENT_TARGET)
     22 
     23 $(COMPONENT_TARGET): $(OMXTESTDIR) $(COMPONENT_TEST) $(OMXLIBDIR) $(COMPONENT_LIB) 
     24 	@echo "Installing $(COMPONENT_TEST)"
     25 	cp -f $(COMPONENT_TEST) $(COMPONENT_TARGET)
     26 	cp -f _perf.ini $(OMXTESTDIR)
     27 	cp -f PERF.awk $(OMXTESTDIR)
     28 	cp -f perf $(TARGETDIR)/bin
     29 	cp -f armtime $(TARGETDIR)/bin
     30 	chmod +x $(TARGETDIR)/bin/armtime
     31 	chmod +x $(TARGETDIR)/bin/perf
     32 
     33 $(COMPONENT_TEST): $(OBJ)
     34 	$(CROSS)gcc $(CFLAGS) -o $(COMPONENT_TEST) $(OBJ) -L$(OMXLIBDIR) -l$(OMXPERFLIB) -lm
     35 
     36 $(SRC): $(HSRC)
     37 
     38 clean:: 
     39 	rm -f $(COMPONENT_TEST)
     40 	rm -f $(OBJ)
     41 
     42 distclean:: clean
     43 
     44 clobber:: clean
     45 	rm -f $(OMXTESTDIR)/$(COMPONENT_TEST)
     46 	rm -f $(OMXTESTDIR)/_perf.ini 
     47 	rm -f $(OMXTESTDIR)/PERF.awk
     48 	rm -f $(TARGETDIR)/bin/perf
     49 	rm -f $(TARGETDIR)/bin/armtime
     50 
     51 
     52