summaryrefslogtreecommitdiff
path: root/package/mopd/src/mopprobe/Makefile
blob: 3b64d5f7117a65fc5d1fe68357a5e0f26a75e84d (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=mopprobe.o 
INCL=-I../ -I../common
LIBS=../common/libcommon.a

all: mopprobe

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

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