diff options
| author | Oskari Timperi <oskari.timperi@iki.fi> | 2015-09-17 01:04:49 +0300 |
|---|---|---|
| committer | Oskari Timperi <oskari.timperi@iki.fi> | 2015-09-17 01:04:49 +0300 |
| commit | 396a8ad5b3291776d455a10ebb4951904dbe01bd (patch) | |
| tree | ee80bddfa4589b7f362b4b1a4c6f0ab3336d4e29 /Makefile | |
| download | diceware-396a8ad5b3291776d455a10ebb4951904dbe01bd.tar.gz diceware-396a8ad5b3291776d455a10ebb4951904dbe01bd.zip | |
initial commit
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..89431e5 --- /dev/null +++ b/Makefile @@ -0,0 +1,35 @@ +# Specify HOST to cross compile +# HOST = i686-w64-mingw32 + +CC = $(HOST)-gcc +LD = $(HOST)-gcc + +CFLAGS += -std=c99 -Wall -g + +SOURCES = main.c htable.c + +ifneq ($(findstring Windows,$(OS)),) +BUILD_WIN32 = 1 +RM = del +else ifneq ($(findstring mingw,$(HOST)),) +BUILD_WIN32 = 1 +RM = rm -f +endif + +ifneq ($(BUILD_WIN32),) +E = .exe +SOURCES += randgen_win32.c +else +E = +SOURCES += randgen_unix.c +endif + +OBJECTS = $(SOURCES:%.c=%.o) + +diceware$(E): $(OBJECTS) + $(LINK.c) -o $@ $^ + +.PHONY: clean +clean: + $(RM) $(OBJECTS) + $(RM) diceware$(E) |
