summaryrefslogtreecommitdiff
path: root/package/mopd/src/moptrace/Makefile
blob: e237d8d1603c1c6d8b0efb3b7bd11d0c188b51af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
OBJS=moptrace.o 
INCL=-I../ -I../common
LIBS=../common/libcommon.a

all: moptrace

moptrace: ${OBJS} version.o $(LIBS)
	$(CC) -o moptrace version.o ${OBJS} ${LIBS}

.c.o: .c
	$(CC) -c $(CFLAGS) ${INCL} $<
	
clean:
	rm -f *.o *~ moptrace 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