aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranklin Wei <git@fwei.tk>2015-05-29 22:39:32 -0400
committerFranklin Wei <git@fwei.tk>2015-05-29 22:39:32 -0400
commit66b21cea956483e2572a3dbbd596b6cbe314f04e (patch)
tree6393817edd54ce42b69139c6eba551635fca748b
parentc9aaf396e29a6803d1e4d0eec326dffda19ca397 (diff)
downloadmarket-sim-66b21cea956483e2572a3dbbd596b6cbe314f04e.zip
market-sim-66b21cea956483e2572a3dbbd596b6cbe314f04e.tar.gz
market-sim-66b21cea956483e2572a3dbbd596b6cbe314f04e.tar.bz2
market-sim-66b21cea956483e2572a3dbbd596b6cbe314f04e.tar.xz
makefile stuff
-rw-r--r--Makefile12
1 files changed, 10 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index cdf395b..1feef9b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,5 @@
CC = cc
+INSTALL = install
SRC := $(wildcard src/*.c)
OBJ := $(SRC:.c=.o)
@@ -7,10 +8,14 @@ GIT_VERSION := $(shell git describe --abbrev=8 --always --dirty)
CFLAGS = -Isrc/ -O2 -g -Wall -Wextra -std=gnu99 -DVERSION_INFO=\"$(GIT_VERSION)\"
+PREFIX = /usr
+BINDIR = $(PREFIX)/bin
+
LIBS = -lcurl -lcurses
HEADERS := $(wildcard src/*.h)
+
market-sim: $(OBJ) Makefile $(HEADERS)
@echo "LD $@"
@$(CC) $(OBJ) -o $@ $(CFLAGS) $(LIBS)
@@ -19,9 +24,12 @@ market-sim: $(OBJ) Makefile $(HEADERS)
@echo "CC $<"
@$(CC) $(CFLAGS) -c $< -o $@
+install: all
+ @echo "INSTALL market-sim"
+ @install market-sim $(BINDIR)
+
clean:
@echo "Cleaning build directory..."
@rm -f $(OBJ) market-sim
-all:
- @echo $(SRC) $(OBJ)
+all: market-sim