Skip to content

Instantly share code, notes, and snippets.

@bitonic
Created February 9, 2015 10:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bitonic/f0daeb4fef219080a6d2 to your computer and use it in GitHub Desktop.
Save bitonic/f0daeb4fef219080a6d2 to your computer and use it in GitHub Desktop.
# Makefile tweaked for Ubuntu 14.04, install gnustep and gnustep-devel first.
HC = ghc
LIBDIR = $(shell $(HC) --print-libdir)
CFLAGS = -fobjc-arc -I$(LIBDIR)/include -I$(LIBDIR)/../../includes
HCFLAGS =
LDFLAGS = -package template-haskell -package language-c-quote -package language-c-inline -L/usr/lib/GNUstep/System/Library/Libraries/ -lgnustep-base -lobjc
OBJS = Main.o Main_objc.o
default: Minimal
%.o: %.hs
$(HC) -c $< $(HCFLAGS)
Main.o:
Main_objc.m: Main.o
Main_objc.o: Main_objc.m
gcc -c -I$(LIBDIR)/include -I/usr/include/GNUstep -fconstant-string-class=NSConstantString -o Main_objc.o Main_objc.m
Minimal: $(OBJS)
$(HC) -o $@ $^ $(LDFLAGS)
.PHONY: clean
clean:
rm -f *.o *.hi Main_objc.[hmo] Minimal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment