summaryrefslogtreecommitdiffhomepage
path: root/Makefile
blob: 92fc9a88b4fc258b5224faae88702f3dd52f8798 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
PROJECTNAME=xmake

SRC=main.cpp xmake.cpp

OBJ=$(SRC:.cpp=.o)

all: $(PROJECTNAME)

$(PROJECTNAME): $(OBJ)
	$(CXX) $(LDFLAGS) $^ $(LDLIBS) $(LIBS) -o $@

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

install:
	mkdir -p $(DESTDIR)/usr/bin
	cp $(PROJECTNAME) $(DESTDIR)/usr/bin/

clean:
	-rm -f *.o $(PROJECTNAME)

.PHONY: clean install all