Permalink
Fetching contributors…
Cannot retrieve contributors at this time
96 lines (68 sloc) 1.35 KB
##
##
## A simple Makefile
##
##
######
include \
$(PATSHOME)/share/atsmake-pre.mk
######
CFLAGS += -O2
######
SOURCES_SATS := \
DB_read_write.sats \
SOURCES_DATS := \
DB_read_write.dats \
######
MYTARGET=MYTARGET
MYCCRULE=MYCCRULE
######
include $(PATSHOME)/share/atsmake-post.mk
######
all:: test
test:: ; $(PATSCC) -tcats DB_read_write.sats
test:: ; $(PATSCC) -tcats DB_read_write.dats
######
ATSHOMEQ="$(ATSHOME)"
ATSCC=$(ATSHOMEQ)/bin/atscc
ATSDOC=$(ATSHOMEQ)/bin/atsdoc
######
INPATH :=
INPATH += -I$(PATSHOME)/src
INPATH += -IATS $(PATSHOME) -IATS $(ATSHOME)
LDPATH :=
LDPATH += -L$(PATSHOME)/utils/libatsopt
LDPATH += -L$(PATSHOME)/utils/libatsynmark
LIBRARY :=
LIBRARY := -latsynmark -latsdoc -latsopt -lats -lgmp
######
#
main.exe: \
main_atxt.dats ; \
$(ATSCC) \
-D_ATS_GCATS \
$(INPATH) -o $@ $< $(LDPATH) $(LIBRARY)
#
main_atxt.dats: main.atxt; \
$(ATSDOC) --outcode $@ -i main.atxt > main_atxt.txt
#
######
main.html: main.exe ; ./main.exe > $@
######
upload_main: \
main.html ; \
scp main.html \
ats-hwxi,ats-lang@web.sourceforge.net:htdocs/EXAMPLE/EFFECTIVATS/Readers-and-Writers/
######
#
# clean: cleanats
#
cleanats:: ; $(RMF) main.exe
cleanats:: ; $(RMF) main_atxt.txt
cleanats:: ; $(RMF) main_atxt.dats
cleanats:: ; $(RMF) main_atxt_dats.c
#
######
cleanall:: ; $(RMF) main.html
######
###### end of [Makefile] ######