summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2017-05-13 20:10:55 +0100
committerSimon Tatham <anakin@pobox.com>2017-05-13 20:10:55 +0100
commit94831068fb5573b1ebdb9def9c2ad09f0694d45c (patch)
tree5ba582008f74fdbe686b76be2f3de27eddd2cbfe /Makefile
parent7e330bca5bc45fa7feb6c31da5c3f1b6b44c208c (diff)
downloadhalibut-94831068fb5573b1ebdb9def9c2ad09f0694d45c.zip
halibut-94831068fb5573b1ebdb9def9c2ad09f0694d45c.tar.gz
halibut-94831068fb5573b1ebdb9def9c2ad09f0694d45c.tar.bz2
halibut-94831068fb5573b1ebdb9def9c2ad09f0694d45c.tar.xz
Build a Windows halibut.exe using clang-cl.
Or rather, clang in MS-targeted code generation but still with the Unix-style command line, which lets me use the existing Makefile with almost no change.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 6 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index c9499e4..7402323 100644
--- a/Makefile
+++ b/Makefile
@@ -76,7 +76,9 @@ CFLAGS += -DLOGALLOC
LIBS += -lefence
endif
-all: halibut
+EXE =#
+
+all: halibut$(EXE)
SRC := ../
@@ -91,6 +93,7 @@ LIBCHARSET_GENPFX = charset-#
MD = -MD
CFLAGS += -I$(LIBCHARSET_SRCDIR) -I$(LIBCHARSET_OBJDIR)
include $(LIBCHARSET_SRCDIR)Makefile
+CC_LINK = $(CC) -o $@
MODULES := main malloc ustring error help licence version misc tree234
MODULES += input in_afm in_pf in_sfnt keywords contents index biblio
@@ -100,8 +103,8 @@ MODULES += winhelp winchm deflate lzx lz77 huffman psdata wcwidth
OBJECTS := $(addsuffix .o,$(MODULES)) $(LIBCHARSET_OBJS)
DEPS := $(addsuffix .d,$(MODULES))
-halibut: $(OBJECTS)
- $(CC) $(LFLAGS) -o halibut $(OBJECTS) $(LIBS)
+halibut$(EXE): $(OBJECTS)
+ $(CC_LINK) $(LFLAGS) $(OBJECTS) $(LIBS)
%.o: $(SRC)%.c
$(CC) $(CFLAGS) -MD -c $<