#############################################################################
##
#W  Makefile                    GAP source                       Frank Celler
##
##
#Y  Copyright (C)  1997,  Lehrstuhl D fuer Mathematik,  RWTH Aachen,  Germany
##
##  This  file compiles    and links  GAP.    It is  created from   the  file
##  "Makegap.in" in the directory `cnf/'.
##
SHELL    = /bin/sh

CC       = gcc
CFLAGS   = -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector-strong -fno-plt
LDFLAGS  = -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now
LIBS     = 
X_LIBS   =  -lXaw -lXmu -lXt -lXext -lX11  -lSM -lICE 
X_CFLAGS = 

# OBJECTS are generated from SOURCE
OBJECTS=xcmds.o utils.o gapgraph.o gaptext.o pty.o popdial.o xgap.o selfile.o 

# compile and link XGAP
xgap: $(OBJECTS)
	$(CC) -o xgap $(OBJECTS) $(CFLAGS) $(LDFLAGS) $(LIBS) $(X_LIBS) $(LOPTS)

# dependencies are automatically generated
xcmds.o: ../../src.x11/xcmds.c ../../src.x11/utils.h ../../src.x11/popdial.h \
 ../../src.x11/gapgraph.h ../../src.x11/gaptext.h ../../src.x11/xgap.h \
 ../../src.x11/pty.h ../../src.x11/selfile.h ../../src.x11/xcmds.h
	$(CC) -I. $(CFLAGS) $(X_CFLAGS) $(COPTS) -o xcmds.o -c ../../src.x11/xcmds.c

utils.o: ../../src.x11/utils.c ../../src.x11/utils.h
	$(CC) -I. $(CFLAGS) $(X_CFLAGS) $(COPTS) -o utils.o -c ../../src.x11/utils.c

gapgraph.o: ../../src.x11/gapgraph.c ../../src.x11/utils.h \
 ../../src.x11/gapgraph.h
	$(CC) -I. $(CFLAGS) $(X_CFLAGS) $(COPTS) -o gapgraph.o -c ../../src.x11/gapgraph.c

gaptext.o: ../../src.x11/gaptext.c ../../src.x11/utils.h \
 ../../src.x11/gaptext.h
	$(CC) -I. $(CFLAGS) $(X_CFLAGS) $(COPTS) -o gaptext.o -c ../../src.x11/gaptext.c

pty.o: ../../src.x11/pty.c ../../src.x11/utils.h ../../src.x11/gaptext.h \
 ../../src.x11/xcmds.h ../../src.x11/xgap.h ../../src.x11/pty.h
	$(CC) -I. $(CFLAGS) $(X_CFLAGS) $(COPTS) -o pty.o -c ../../src.x11/pty.c

popdial.o: ../../src.x11/popdial.c ../../src.x11/utils.h \
 ../../src.x11/popdial.h ../../src.x11/bitmaps/return.bm
	$(CC) -I. $(CFLAGS) $(X_CFLAGS) $(COPTS) -o popdial.o -c ../../src.x11/popdial.c

xgap.o: ../../src.x11/xgap.c ../../src.x11/utils.h ../../src.x11/popdial.h \
 ../../src.x11/gapgraph.h ../../src.x11/gaptext.h ../../src.x11/xcmds.h \
 ../../src.x11/pty.h ../../src.x11/selfile.h ../../src.x11/xgap.h \
 ../../src.x11/bitmaps/checksym.bm ../../src.x11/bitmaps/emptymk.bm \
 ../../src.x11/bitmaps/exmark.bm ../../src.x11/bitmaps/menusym.bm
	$(CC) -I. $(CFLAGS) $(X_CFLAGS) $(COPTS) -o xgap.o -c ../../src.x11/xgap.c

selfile.o: ../../src.x11/selfile.c ../../src.x11/utils.h \
 ../../src.x11/selfile.h
	$(CC) -I. $(CFLAGS) $(X_CFLAGS) $(COPTS) -o selfile.o -c ../../src.x11/selfile.c

