File: Makefile

package info (click to toggle)
asis 2005-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 6,424 kB
  • ctags: 27
  • sloc: ada: 73,883; makefile: 201
file content (41 lines) | stat: -rw-r--r-- 1,332 bytes parent folder | download | duplicates (2)
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
include ../Makefile.stub
IDIR=$(INSTALL_DIR)/asis
install: libasis$(arext)
	$(RMDIR) $(IDIR)
	$(MKDIR) $(IDIR)
	$(INSTALL_FILES) *.ali $(IDIR)
	$(CHMOD) a-w $(IDIR)/*.ali
	$(INSTALL_FILES) *$(arext) $(IDIR)
	$(INSTALL_FILES) $(GNAT_DIR)/*.ads  $(GNAT_DIR)/*.adb $(IDIR)
	$(INSTALL_FILES) $(ASIS_DIR)/*.ads  $(ASIS_DIR)/*.adb $(IDIR)
	$(MAKE) -e -C ../tools/asistant

libasis$(arext): bld-objs
	$(AR) $(AR_FLAGS) libasis$(arext) *$(objext)
ifneq ($(strip $(filter-out OpenVMS% openvms%, $(host))),)
#	VMS doesn't understand Unix shell "if" commands
	if $(RANLIB_TEST) ; then $(RANLIB) libasis$(arext); else true; fi
endif

bld-objs:
	$(CC) -c $(GNATMAKE_FLAGS) -I$(GNAT_DIR) -I$(ASIS_DIR) install_asis.adb
#	install_asis.adb is not '-gnatg-compilable'
ifeq "$(findstring hppa, $(host))" "hppa"
# this file has problems when compiled with optimization see 7418-013
	$(CC) -c  -I$(GNAT_DIR)  $(CFLAGS) -O0 $(ASIS_DIR)/a4g-a_sinput.adb
endif
	gnatmake -c $(GNATMAKE_FLAGS) -aI$(GNAT_DIR) -aI$(ASIS_DIR) $(CFLAGS)\
	         install_asis.adb \
                 -cargs $(ADA_FLAGS_FOR_ASISLIB)
	$(RM) install_asis$(objext) install_asis.ali

libasis$(soext): clean
	$(MAKE) -e bld-objs CFLAGS="$(CFLAGS) -fPIC"
	$(CC) -shared -o libasis$(soext) *$(objext)

clean:
	$(RM) *$(objext)
	$(RM) *.ali
	$(RM) *$(arext)
	$(RM) *$(soext)
	$(RM) *~