Index: trunk/Ohana/src/gastro/Makefile
===================================================================
--- trunk/Ohana/src/gastro/Makefile	(revision 2435)
+++ trunk/Ohana/src/gastro/Makefile	(revision 2510)
@@ -15,6 +15,6 @@
 
 #  
-INCS	= 	-I$(INC) -I$(LINC) -I$(XINC) -I$(LINC)/$(ARCH)
-LIBS	= 	-L$(LLIB) -lFITS -lsocket -lnsl -lohana -lm 
+INCS	= 	-I$(INC) -I$(LINC) -I$(XINC)
+LIBS	= 	-L$(LLIB) -lFITS -lohana -lm -lsocket -lnsl 
 CFLAGS	=	-o $*.$(ARCH).o $(INCS)
 CCFLAGS	=	$(INCS) $(LIBS) 
@@ -37,7 +37,9 @@
 
 $(BIN)/extract: $(EOBJ)
+	@if [ ! -d $(BIN) ]; then mkdir -p $(BIN); fi
 	$(CC) $(EOBJ) -o $(BIN)/extract $(CCFLAGS) 
 
 install.extract:
+	@if [ ! -d $(BIN) ]; then mkdir -p $(BIN); fi
 	rm -f $(DESTBIN)/extract
 	cp $(BIN)/extract   $(DESTBIN)/
@@ -53,7 +55,9 @@
 
 $(BIN)/simulate: $(SOBJ)
+	@if [ ! -d $(BIN) ]; then mkdir -p $(BIN); fi
 	$(CC) $(SOBJ) -o $(BIN)/simulate.$(ARCH) $(CCFLAGS) 
 
 install.simulate:
+	@if [ ! -d $(BIN) ]; then mkdir -p $(BIN); fi
 	rm -f $(DESTBIN)/simulate
 	cp $(BIN)/simulate.$(ARCH) $(DESTBIN)/simulate
@@ -80,4 +84,5 @@
 
 $(BIN)/gastro.$(ARCH): $(GOBJ)
+	@if [ ! -d $(BIN) ]; then mkdir -p $(BIN); fi
 	$(CC) $(GOBJ) -o $(BIN)/gastro.$(ARCH) $(CCFLAGS) 
 
@@ -85,4 +90,5 @@
 
 $(DESTBIN)/gastro: $(BIN)/gastro.$(ARCH)
+	@if [ ! -d $(BIN) ]; then mkdir -p $(BIN); fi
 	rm -f $(DESTBIN)/gastro
 	cp $(BIN)/gastro.$(ARCH)   $(DESTBIN)/gastro
@@ -103,4 +109,5 @@
 
 $(BIN)/gscdump.$(ARCH): $(DOBJ)
+	@if [ ! -d $(BIN) ]; then mkdir -p $(BIN); fi
 	$(CC) $(DOBJ) -o $(BIN)/gscdump.$(ARCH) $(CCFLAGS) 
 
@@ -108,4 +115,5 @@
 
 $(DESTBIN)/gscdump: $(BIN)/gscdump.$(ARCH)
+	@if [ ! -d $(BIN) ]; then mkdir -p $(BIN); fi
 	rm -f $(DESTBIN)/gscdump
 	cp $(BIN)/gscdump.$(ARCH)   $(DESTBIN)/gscdump
@@ -122,4 +130,5 @@
 
 $(BIN)/astro: $(AOBJ)
+	@if [ ! -d $(BIN) ]; then mkdir -p $(BIN); fi
 	$(CC) $(AOBJ) -o $(BIN)/astro $(CCFLAGS) 
 
@@ -135,4 +144,5 @@
 
 $(BIN)/rastro: $(ROBJ)
+	@if [ ! -d $(BIN) ]; then mkdir -p $(BIN); fi
 	$(CC) $(ROBJ) -o $(BIN)/rastro $(CCFLAGS) 
 
