| 1 |
######################################################################## |
| 2 |
# |
| 3 |
# MAKEFILE FOR STAND-ALONE UX CODE APPLICATION. |
| 4 |
# |
| 5 |
# EXECUTABLE is the name of the executable to be created |
| 6 |
# MAIN is the .o file containing your main() function |
| 7 |
# INTERFACES is a list of the generated C code files |
| 8 |
# APP_OBJS is a (possibly empty) list of the object code |
| 9 |
# files that form the non-interface portion of |
| 10 |
# your application |
| 11 |
# |
| 12 |
# In the first three statements, the variables on the right |
| 13 |
# of the equal sign will be replaced with their corresponding |
| 14 |
# values when the makefile is automatically generated. |
| 15 |
# |
| 16 |
# $Date: 2005-11-16 14:21:06 $ $Revision: 1.2 $ |
| 17 |
# |
| 18 |
# 051111 last modif |
| 19 |
######################################################################### |
| 20 |
|
| 21 |
|
| 22 |
include ../../../local/default.mk |
| 23 |
|
| 24 |
|
| 25 |
MAIN = XEchelle.o |
| 26 |
INTERFACES = MainShell.o \ |
| 27 |
SearchShell.o \ |
| 28 |
CalibShell.o \ |
| 29 |
file_list.o \ |
| 30 |
file_selection.o \ |
| 31 |
RebinShell.o \ |
| 32 |
lincat_list.o \ |
| 33 |
SessionShell.o \ |
| 34 |
extin_dialog.o \ |
| 35 |
resid_dialog.o \ |
| 36 |
HelpShell.o \ |
| 37 |
RotateShell.o \ |
| 38 |
OrderShell.o \ |
| 39 |
BackgroundShell.o \ |
| 40 |
ExtractionShell.o \ |
| 41 |
SkyShell.o \ |
| 42 |
FlatShell.o \ |
| 43 |
RespShell.o \ |
| 44 |
MergeShell.o |
| 45 |
|
| 46 |
EXEC = echelle |
| 47 |
EXECUTABLE = ../../exec/$(EXEC).exe |
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
APPL_OBJS = midasutil.o alloc.o cb_list.o misc.o splib.o |
| 53 |
UX_DIR = ../../GraphLib/libsrc/$(UIMX) |
| 54 |
|
| 55 |
LINC = -I../incl -I../../incl |
| 56 |
|
| 57 |
UX_LIBPATH = -L../../lib |
| 58 |
|
| 59 |
X_CFLAGS = |
| 60 |
MOTIF_CFLAGS = |
| 61 |
|
| 62 |
CFLAGS += $(C_OPT) $(DEBUG) $(GUI_OPT) \ |
| 63 |
$(LINC) -I$(INC) -I$(UX_DIR)/include \ |
| 64 |
$(X_CFLAGS) $(MOTIF_CFLAGS) -DXOPEN_CATALOG \ |
| 65 |
$(XMINC) $(X11INC) |
| 66 |
|
| 67 |
# The following object files are provided to work around a motif bug. |
| 68 |
# They are not necessarily needed to compile your application. |
| 69 |
LIBPATH = $(X11_LIBPATH) $(MOTIF_LIBPATH) |
| 70 |
XLIB = $(LIBPATH) $(X_LIBS) $(XOPEN_LIBS) |
| 71 |
|
| 72 |
LLIB = $(UX_LIBPATH) -lxech -luimx -lcom -L$(LIBDIR) -lxcon -lmidas |
| 73 |
LIBS = $(LIBDIR)/libmidas.a |
| 74 |
|
| 75 |
OBJS = $(MAIN) $(INTERFACES) $(APPL_OBJS) |
| 76 |
|
| 77 |
all: $(EXECUTABLE) |
| 78 |
|
| 79 |
$(EXECUTABLE): $(OBJS) $(LIBS) |
| 80 |
$(LDCC) $(OBJS) $(LLIB) $(XLIB) $(MLIB) $(SLIB) -o $(EXECUTABLE) |
| 81 |
$(STRIP) $(EXECUTABLE) |
| 82 |
@echo "done" |
| 83 |
|
| 84 |
clean: |
| 85 |
$(RM) *.o |
| 86 |
|
| 87 |
clean_exec: |
| 88 |
$(RM) $(EXECUTABLE) |
| 89 |
|
| 90 |
|
| 91 |
tmp_makefile: makefile |
| 92 |
sed -e 's/^MAIN.*//' \ |
| 93 |
-e 's/^INTERFACES.*//' \ |
| 94 |
-e 's/^CMAIN/MAIN/' \ |
| 95 |
-e 's/^CINTERFACES/INTERFACES/' \ |
| 96 |
-e 's/\([^^]\)\.o/\1\.o/g' \ |
| 97 |
-e 's/^all: tmp_makefile/all:/' makefile > tmp_makefile |
| 98 |
rm -f makefile |
| 99 |
mv tmp_makefile makefile |