cointoss/Makefile

26 lines
381 B
Makefile
Raw Normal View History

2014-10-30 16:19:33 +00:00
CXX=gcc
CXXFLAGS= -O3 -Wall -std=gnu99
INCLUDES=
LIBS=
MV=mv
MKDIR=mkdir -p
RM=rm -rf
SRC_FILES := $(wildcard src/*.c)
2014-11-04 17:41:35 +00:00
OBJ_FILES := $(addprefix obj/, $(notdir $(SRC_FILES:.c=.o)))
2014-10-30 16:19:33 +00:00
all: $(OBJ_FILES)
$(MKDIR) bin
2014-11-04 17:41:35 +00:00
$(CXX) $(CXXFLAGS) $(LIBS) -o bin/cointoss obj/*.o
2014-10-30 16:19:33 +00:00
2014-11-04 17:41:35 +00:00
obj/%.o: src/%.c
2014-10-30 16:19:33 +00:00
$(CXX) $(CXXFLAGS) $(INCLUDES) -c -o $@ $<
clean:
2014-11-04 17:41:35 +00:00
$(RM) obj/*.o
2014-10-30 16:19:33 +00:00
2014-10-30 20:21:47 +00:00
cleanall: clean
2014-10-30 16:19:33 +00:00
$(RM) bin