Argument order matters
This commit is contained in:
parent
ebea2b2a0d
commit
f7ad6580ee
@ -5,13 +5,13 @@ OBJ := $(SRC:.c=.o)
|
||||
|
||||
all: $(OBJ) $(OUT)
|
||||
%.o: %.c
|
||||
$(CC) -o $@ -c $(CFLAGS) $<
|
||||
$(CC) $< -c $(CFLAGS) -o "$@"
|
||||
clean:
|
||||
rm -f $(OBJ) $(OUT)
|
||||
|
||||
ifneq ($(OUT),)
|
||||
$(OUT): $(OBJ)
|
||||
$(CC) -o "$@" $(LDFLAGS) $^
|
||||
$(CC) $^ $(LDFLAGS) -o "$@"
|
||||
endif
|
||||
|
||||
.PHONY: all clean
|
||||
|
@ -5,14 +5,14 @@ OBJ = ${SRC:.cpp=.o}
|
||||
all: ${OBJ} ${OUT}
|
||||
|
||||
%.o: %.cpp
|
||||
${CXX} -o $@ -c ${CXXFLAGS} $<
|
||||
${CXX} $< -c ${CXXFLAGS} -o "$@"
|
||||
|
||||
clean:
|
||||
rm -f ${OBJ} ${OUT}
|
||||
|
||||
ifneq (${OUT},)
|
||||
${OUT}: ${OBJ}
|
||||
${CXX} -o "$@" ${LDFLAGS} $^
|
||||
${CXX} $^ ${LDFLAGS} -o "$@"
|
||||
endif
|
||||
|
||||
.PHONY: all clean
|
||||
|
Loading…
Reference in New Issue
Block a user