Skip to content

Commit

Permalink
Merge pull request #4 from busyluo/master
Browse files Browse the repository at this point in the history
replace the unusable Makefile
  • Loading branch information
yedf2 committed May 14, 2016
2 parents 78815da + df0476e commit 8163e84
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions examples/Makefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
include ../config.mk
CXXFLAGS += $(PLATFORM_CXXFLAGS) -lhandy $(PLATFORM_LDFLAGS)

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 $@
rm -f $(PROGS)

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

0 comments on commit 8163e84

Please sign in to comment.