changeset 1516:f72118a8e98c

Makefile is now generic for either SGI make or GNU make
author bert <bert>
date Wed, 15 Jan 2003 20:04:42 +0000 (2003-01-15)
parents c0a76a459f3c
children 402b0364116f
files conversion/mri_to_minc/Makefile
diffstat 1 files changed, 15 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/conversion/mri_to_minc/Makefile
+++ b/conversion/mri_to_minc/Makefile
@@ -2,14 +2,11 @@
 #
 #     Generic Makefile
 #
-# if you are creating only one executable, you need only modify the
-# following lines:
-
-PROG     = ge_uncompress#                  # executable name
-PROG_OBJ = ge_uncompress.o#                # files to compile
-OPT      = -O -prototypes#                     # compiler options
-LDOPT    = -L/usr/local/lib -lsun -lm -lc_s# ld options
-INCLUDES = -I/usr/local/include -I.#           # include directories
+PROG     = ge_uncompress	# executable name
+PROG_OBJ = ge_uncompress.o	# files to compile
+OPT      = -O			# compiler options
+LDOPT    = -L/usr/local/lib	# ld options
+INCLUDES = -I/usr/local/include -I. # include directories
 
 PERL_PROGS = ge4_to_minc ge5_to_minc siemens_to_minc dicom_to_minc \
    siemens_magnetom_vision_to_minc gedicom_to_minc dicomfile_to_minc
@@ -17,22 +14,25 @@
 
 # --------------------------------------------------------------------
 
-.SUFFIXES: .ln
+.SUFFIXES: .ln .pl
 
-CFLAGS    = $(INCLUDES) $(OPT)#           # CFLAGS and LINTFLAGS should
-LINTFLAGS = $(INCLUDES)#                  # be same, except for -g/-O
+CFLAGS    = $(INCLUDES) $(OPT)	# CFLAGS and LINTFLAGS should
+LINTFLAGS = $(INCLUDES)		# be same, except for -g/-O
 
 default : $(PROG) $(PERL_PROGS)
 
 all : $(PROG) lint_$(PROG) $(PERL_PROGS)
 
-.c.ln:#                                   # defines the rule for creating .ln
+.c.ln:				# defines the rule for creating .ln
 	lint $(LINTFLAGS) -c $< -o $@
 
-.c.o:#                                    # defines the rule for creating .o
+.c.o:				# defines the rule for creating .o
 	$(CC) $(CFLAGS) -c $< -o $@
 
-LINT_LIST = $(PROG_OBJ:.o=.ln)#           # list of lint files in program
+.pl:
+	cat $(PERL_INCLUDE) $@.pl > $@; chmod +x $@
+
+LINT_LIST = $(PROG_OBJ:.o=.ln)	# list of lint files in program
 
 $(PROG_OBJ) : Makefile
 
@@ -45,8 +45,7 @@
 	lint -u $(LINTFLAGS) $(LINT_LIST)
 
 # How to create perl programs from multiple source files
-$(PERL_PROGS): $$@.pl $(PERL_INCLUDE) Makefile
-	cat $(PERL_INCLUDE) $@.pl > $@; chmod +x $@
+$(PERL_PROGS): $(PERL_INCLUDE) Makefile
 
 clean:
 	\rm -f $(PROG)  $(PROG_OBJ)  $(LINT_LIST) $(PERL_PROGS)