Last active
April 10, 2017 17:59
-
-
Save happyincent/321d1edcd96ab67ae31b88f8b9148eb4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Makefile | |
CC := gcc | |
CXX := g++ | |
CFLAGS := -g -Wall -o3 -std=gnu99 | |
CXXFLAGS := -g -Wall -o3 -std=c++11 | |
LDFLAGS := -g | |
# LDLIBS := -pthread | |
TGT := xxx #(e.g. xxx.cpp in SRC) | |
EXT := .cpp | |
SRC := $(wildcard *$(EXT)) | |
OBJ := $(SRC:$(EXT)=.o) | |
all: $(TGT) | |
$(TGT): $(OBJ) | |
dep: | |
$(CC) -M *$(EXT) > depend | |
clean: | |
@rm -f $(TGT) *.o depend | |
# all: $(TGT) | |
# $(TGT): $(OBJ) | |
# $(CC) $(CFLAGS) -o $@ $(OBJ) $(LDLIBS) | |
# %.o : %$(EXT) | |
# $(CC) $(CFLAGS) -c -o $@ $< |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment