summaryrefslogtreecommitdiff
blob: 6323583417841273c49418019fd81d9fd9bd8e89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
 source/Makefile |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/source/Makefile b/source/Makefile
index 46d89cc..aa751c7 100644
--- a/source/Makefile
+++ b/source/Makefile
@@ -78,8 +78,10 @@ CFLAGS		=   -Wall -pipe -g3
 #CFLAGS		=   -Wall -pipe -marchi686 -pedantic  -gdwarf-2 -g3
 #CFLAGS		=   -Wall -O3 -march=i686 
 ifneq ($(FFTW),/usr/local)
+ifneq ($(FFTW),/usr)
 CFLAGS		+= -I$(INC)
 endif
+endif
 
 #			NOTE:
 # DOUBLESWITCH = ON	for double precision;
@@ -91,15 +93,15 @@ endif
 DOUBLESWITCH 	= ON
 
 ifeq ($(DOUBLESWITCH),ON)
-LDFLAGS	 = -L$(LIB) -ldfftw -lm  
+LIBS	 = -L$(LIB) -ldfftw -lm  
 CFLAGS	+= -DDOUBLE 
 TARGET	 = deden
 else
-LDFLAGS	 = -L$(LIB) -lsfftw -lm  
+LIBS	 = -L$(LIB) -lsfftw -lm  
 TARGET	 = seden
 endif
 
-LDFLAGS += -g -lgsl -lgslcblas 
+LIBS += -lgsl -lgslcblas 
 
 # GSL_PREFIX:= /sw/lib
 # LDFLAGS += -l$(GSL_PREFIX)/libgsl.a -l$(GSL_PREFIX)/libgslcblas.a 
@@ -120,17 +122,18 @@ OBJ	= 	addmaps.o   apodfc.o   apodfo.o     back.o     cadhkl.o  \
 all:		eden	fbyteswap 
 
 eden:  		eden.o   $(OBJ)
-		$(CC)  $^ $(LDFLAGS) -o $@
+		$(CC)  $(LDFLAGS) -o $@ $^ $(LIBS)
 
 fbyteswap:	fbyteswap.c		
-		$(CC) -o $@ $^
+		$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
 
 install:	all
+		mkdir -p $(BIN)
 		mv fbyteswap $(BIN)
 		mv eden $(BIN)/$(TARGET)
 		chmod 751 $(BIN)/$(TARGET)
-		chmod +x mkeden.csh
-		./mkeden.csh $(BIN) $(BIN)/$(TARGET)
+#		chmod +x mkeden.csh
+#		./mkeden.csh $(BIN) $(BIN)/$(TARGET)
 
 dist:		clean
 		cd ../..; tar -cvf eden_$(VERSION).tar --exclude CVS --exclude \#\*\# --exclude \*~ --exclude Misc --exclude .\* eden; gzip -f eden_$(VERSION).tar