diff options
author | Bobby Bingham <koorogi@koorogi.info> | 2014-07-04 10:45:37 -0500 |
---|---|---|
committer | Bobby Bingham <koorogi@koorogi.info> | 2014-07-04 10:45:37 -0500 |
commit | dbe88638530aacb4cffccfb0b58fa934fc78dd6b (patch) | |
tree | 1379ec704e9f2b6ce3e2c4b92da367103e662b35 /Makefile | |
parent | 4178350f795d568cdba861b6200bb9a33944e1c9 (diff) |
Add the C++ reference wikisort implementation
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 18 |
1 files changed, 12 insertions, 6 deletions
@@ -1,8 +1,11 @@ -CFLAGS = -Os -pipe -std=c99 -D_XOPEN_SOURCE=500 -LDFLAGS = -lm +COMMONFLAGS = -Os -pipe -D_XOPEN_SOURCE=500 +CFLAGS = -std=c99 +CXXFLAGS = -std=c++11 +LIBS = -lm -SRCS = $(sort $(wildcard *.c)) -OBJS = $(SRCS:.c=.o) +SRCS_C = $(sort $(wildcard *.c)) +SRCS_CC = $(sort $(wildcard *.cc)) +OBJS = $(SRCS_C:.c=.o) $(SRCS_CC:.cc=.o) BINS = bench .PHONY: all clean @@ -14,7 +17,10 @@ clean: rm -f $(OBJS) bench: $(OBJS) - $(CC) $(LDFLAGS) $^ -o $@ + $(CXX) $^ -o $@ $(LIBS) + +%.o: %.cc + $(CXX) $(COMMONFLAGS) $(CXXFLAGS) -c $< -o $@ %.o: %.c - $(CC) $(CFLAGS) -c $< -o $@ + $(CC) $(COMMONFLAGS) $(CFLAGS) -c $< -o $@ |