Skip to content

Commit

Permalink
more testing
Browse files Browse the repository at this point in the history
  • Loading branch information
melsman committed Jan 10, 2024
1 parent e958fd3 commit bfcaf7f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
7 changes: 3 additions & 4 deletions lib/github.com/diku-dk/sml-tigr/test/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
PROGNAME=hello

MLKIT=mlkit
LD=cc -arch x86_64

LIBS=
ifeq ($(OS),Windows_NT)
LDFLAGS += -s -lopengl32 -lgdi32
else
Expand All @@ -11,14 +9,15 @@ else
LDFLAGS += -framework OpenGL -framework Cocoa -L. -ltigr
else ifeq ($(UNAME_S),Linux)
LDFLAGS += -s -lGLU -lGL -lX11 -ltigr
LIBS += -libs 'm,c,dl,GLU,GL,X11,tigr'
endif
endif

.PHONY: all
all: $(PROGNAME).exe

$(PROGNAME).exe: $(PROGNAME).mlb $(PROGNAME).sml libtigr.so
MLCOMP=mlkit $(MLKIT) -ldexe '$(LD) $(LDFLAGS)' -o $@ $<
MLCOMP=mlkit $(MLKIT) -ldexe '$(CC) $(LDFLAGS)' $(LIBS) -o $@ $<

libtigr.so: ../clib/libtigr.so
cp $< $@
Expand Down
7 changes: 4 additions & 3 deletions sml-examples/flags/Makefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
PROGNAME=flags
MLKIT=mlkit

LIBS=
ifeq ($(OS),Windows_NT)
LDFLAGS += -s -lopengl32 -lgdi32
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
LDFLAGS += -arch x86_64 -framework OpenGL -framework Cocoa -L. -ltigr
else ifeq ($(UNAME_S),Linux)
LDFLAGS += -s -lGLU -lGL -lX11 -L. -ltigr
LDFLAGS += -L.
LIBS += -libs 'm,c,dl,GLU,GL,X11,tigr'
endif
endif

.PHONY: all
all: $(PROGNAME).exe

$(PROGNAME).exe: $(PROGNAME).mlb $(PROGNAME).sml libtigr.so
MLCOMP=mlkit $(MLKIT) -ldexe '$(CC) $(LDFLAGS)' -o $@ $<
MLCOMP=mlkit $(MLKIT) -ldexe '$(CC) $(LDFLAGS)' $(LIBS) -o $@ $<

libtigr.so: ../../lib/github.com/diku-dk/sml-tigr/clib/libtigr.so
cp $< $@
Expand Down
7 changes: 4 additions & 3 deletions sml-examples/mandel/Makefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
PROGNAME=mandel
MLKIT=mlkit

LIBS=
ifeq ($(OS),Windows_NT)
LDFLAGS += -s -lopengl32 -lgdi32
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
LDFLAGS += -arch x86_64 -framework OpenGL -framework Cocoa -L. -ltigr
else ifeq ($(UNAME_S),Linux)
LDFLAGS += -s -lGLU -lGL -lX11 -L. -ltigr
LDFLAGS += -L.
LIBS += -libs 'm,c,dl,GLU,GL,X11,tigr'
endif
endif

.PHONY: all
all: $(PROGNAME).exe

$(PROGNAME).exe: $(PROGNAME).mlb $(PROGNAME).sml libtigr.so
MLCOMP=mlkit $(MLKIT) -ldexe '$(CC) $(LDFLAGS)' -o $@ $<
MLCOMP=mlkit $(MLKIT) -ldexe '$(CC) $(LDFLAGS)' $(LIBS) -o $@ $<

libtigr.so: ../../lib/github.com/diku-dk/sml-tigr/clib/libtigr.so
cp $< $@
Expand Down

0 comments on commit bfcaf7f

Please sign in to comment.