### $ID$
### Konfiguracja ORBit:
ORBIT_IDL = /usr/bin/orbit-idl
ORBIT_CFLAGS = -I/usr/lib/glib/include -I/usr/include
ORBIT_LIBS = -L/usr/lib -lORBit -lIIOP -lORBitutil -lglib -lm
CFLAGS = $(ORBIT_CFLAGS) -g
LFLAGS = $(ORBIT_LIBS)

all: security.h msg-client attsamp.h consamples.h excsamp.h opsamples.h 

### Kilka przeksztace ORBit IDL
%.h : %.idl
	orbit-idl $<
%-common.c : %.idl
	orbit-idl $<
%-skels.c : %.idl
	orbit-idl $<
%-stubs.c : %.idl
	orbit-idl $<
%SK.cc: %.idl
	omniidl2 $<
%.hh : %.idl
	omniidl2 $<
msg.h: msg.idl
msg-common.c: msg.idl
dvd.h: dvd.idl
dvd-common.c: dvd.idl
dvd-skels.c: dvd.idl
dvd-stubs.c: dvd.idl
security.h: security.idl
security-common.c: security.idl
security-skels.c: security.idl
security-stubs.c: security.idl
attsamp.h: attsamp.idl
consamples.h: consamples.idl
excsamp.h: excsamp.idl
opsamples.h: opsamples.idl

### Tutaj ustawiono powizanie z omniORB2 zapewniajc dodatkow weryfikacj
### czy IDL jest poprawnie zbudowane z perspektywy innego jzyka,
### ORB i parsera. Jeeli ten porednik nie jest zaistalowany, to
### powizanie si nie uda, generujc bd.
dvd.hh: dvd.idl
dvdSK.cc: dvd.idl
security.hh: security.idl
securitySK.cc: security.idl
msg.hh: msg.idl
msgSK.cc: msg.idl

### Kompilacja klienta komunikatw
msg-client: msg-client.o msg-common.o msg-stubs.o
	$(CC) -o msg-client msg-client.o msg-stubs.o msg-common.o  -lIIOP -lORBit -lORBitutil $(LFLAGS)

msg-client.o: msg-client.c

msg-server: msg-server.o msg-common.o msg-skels.o
	$(CC) -o msg-server msg-server.o msg-skels.o msg-common.o  -lIIOP -lORBit -lORBitutil $(LFLAGS)

msg-server.o: msg-server.c
