## #############################################################
## Makefile for ${RTT_TESTCONTEXT}/stubsrc
## 
## Compiling stub files and combining them in Archive
##                        libstubsglobal.a
## Part of the 
##  Real-Time Tester System
##  (c) Verified Systems International GmbH
## #############################################################
## RT Tester Version 6.0.3.0.1
## #############################################################


CC=gcc

CFLAGS= -O0 -c -I/home/jpx/rtt/ta-project/PLS/test1/src -I/home/jpx/rtt/ta-project/stubsrc \
       -I/cygdrive/c/Programme/Verified/RT-Tester/include \
        -I/home/jpx/rtt/ta/include \
	-pg \
	-Dmsec=*1000 \
	-Dmicrosec=*1 \
	-g \
	-Wall \
	-I$(RTTHOME)/include \
	-I/home/jpx/rtt/ta/PLS/test1/stubsrc
 
OBJ_FILES=$(patsubst %.c,%.o,$(wildcard *.c))

all: libstubglobal.a 

libstubglobal.a : $(OBJ_FILES) 
	ar cru $@ $(OBJ_FILES) ;
	ranlib $@;

clean:
	rm -f *.o *.a


## make library, despite the fact that some compilations fail(ed)

.PHONY: anyway

anyway:
	if make -k; then \
	  echo "## NO FAILURES."; \
	else \
	  echo "## !! WARNING: continuing despite some stubs don't compile."; \
	  rm libstubglobal.a; \
	  ar cru libstubglobal.a $(wildcard *.o) ;  \
	  ranlib libstubglobal.a; \
	fi;

## ----------------------------------------------------

.PHONY: show

show:	
	@echo "-- libstubglobal.a: --------------------------------------------"
	nm --print-armap libstubglobal.a 
	@echo "------------------------------------------------------------"

