Skip to content

Commit

Permalink
replace the unusable Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
busyluo committed May 14, 2016
1 parent 3668496 commit 537f334
Showing 1 changed file with 9 additions and 19 deletions.
28 changes: 9 additions & 19 deletions examples/Makefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,13 @@
include ../config.mk
CXX=g++
CXXFLAGS += -pthread -DOS_LINUX -DLITTLE_ENDIAN=1 -std=c++11 -lhandy

SOURCES = $(shell ls *.cc)
SRCS=$(wildcard *.cc)
PROGS=$(SRCS:.cc=)

PROGRAMS = $(SOURCES:.cc=)

default: $(PROGRAMS)

$(PROGRAMS): $(LIBFILE)
all:$(PROGS)
$(PROGS):%:%.cc
$(CXX) $^ -o $@ $(CXXFLAGS)

.PHONY:clean
clean:
-rm -f $(PROGRAMS)
-rm -f *.o

.cc.o:
$(CXX) $(CXXFLAGS) -c $< -o $@

.c.o:
$(CC) $(CFLAGS) -c $< -o $@

.cc:
$(CXX) -o $@ $< $(CXXFLAGS) $(LDFLAGS)

rm $(PROGS)

0 comments on commit 537f334

Please sign in to comment.