Building ATS2-Postiats-0.0.7 on OSX

29 views
Skip to first unread message

Shmulik Regev

unread,
Apr 19, 2014, 3:12:25 AM4/19/14
to ats-lan...@googlegroups.com
Hi,

While trying to build ATS2-Postiats-0.0.7 I encountered a problem with gmp include and library path. The library was missing from my machine, so I used macports to install it. Macports installs into /opt/local . I noticed no single place to add include and library paths to the makefiles so I patched them manually. I recommend however that either using configure, or otherwise through some customization of the makefiles this process can be eased.

For reference these are the (ugly and bruteforce) changes I made

./src/CBOOT/Makefile:GCFLAG=-I/opt/local/include -L/opt/local/lib
./src/CBOOT/Makefile:  $(CCOMP) -O2 -I . $(GCFLAG) -o $@ ccomp/runtime/ats_prelude.c $^ -I/opt/local/include -L/opt/local/lib -lgmp $(LIBGC)
./src/CBOOT/Makefile:%_sats.o: %_sats.c ; $(CCOMP) -O2 -I . -I ./ccomp/runtime -I/opt/local/include -L/opt/local/lib -c -o $@ $<
./src/CBOOT/Makefile:%_dats.o: %_dats.c ; $(CCOMP) -O2 -I . -I ./ccomp/runtime -I/opt/local/include -L/opt/local/lib -c -o $@ $<
./src/CBOOT/Makefile:libc_%.o : libc/%.c ; $(CCOMP) -I . -I ./ccomp/runtime -I/opt/local/include -L/opt/local/lib -c -o $@ $<
./src/Makefile:  $(ATSCC) $(ATSGCFLAG) $(ATSCCFLAGS) -I/opt/local/include -L/opt/local/lib -o $@ pats_main_dats.o $(OBJECTS) -lats -lgmp

Cheers,
Shmul

Brandon Barker

unread,
Apr 19, 2014, 9:27:29 AM4/19/14
to Shmulik Regev, ats-lang-users
I haven't tried this but generally just doing e.g.:
export CFLAGS=...
export LDFLAGS=...
make

will work with most makefiles.

Brandon Barker
brandon...@gmail.com
> --
> You received this message because you are subscribed to the Google Groups
> "ats-lang-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ats-lang-user...@googlegroups.com.
> To post to this group, send email to ats-lan...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ats-lang-users/01a5204f-d545-4913-a794-3d5386b7af4a%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages