SHOW:
|
|
- or go back to the newest paste.
| 1 | PH = ../phoenix | |
| 2 | DIR = ./out | |
| 3 | APP = lotto | |
| 4 | BIN = $(APP) | |
| 5 | ||
| 6 | CXXFILES = $(wildcard *.cpp) | |
| 7 | HEADERS = $(wildcard *.hpp) | |
| 8 | - | -lX11 = -lkernel32 -luser32 -lgdi32 -ladvapi32 -lcomctl32 -lcomdlg32 -lshell32 -lole32 |
| 8 | + | GTK_LIB = `pkg-config --libs gtk+-2.0` -lX11 |
| 9 | - | #WIN32_LIBS += -mconsole |
| 9 | + | |
| 10 | CXX = g++ | |
| 11 | - | WINDRES = windres |
| 11 | + | |
| 12 | CXXFLAGS = $(CXXINCS) -std=gnu++0x -DPHOENIX_GTK `pkg-config --cflags gtk+-2.0` -g -fpermissive | |
| 13 | RM = rm -f | |
| 14 | - | CXXFLAGS = $(CXXINCS) -std=gnu++0x -DPHOENIX_GTK -g -fpermissive |
| 14 | + | |
| 15 | .PHONY: all clean | |
| 16 | ||
| 17 | all: mkout $(DIR)/$(BIN) | |
| 18 | ||
| 19 | clean: | |
| 20 | $(shell if [ -d "$(DIR)" ]; then $(RM) -r "$(DIR)"; fi) | |
| 21 | ||
| 22 | mkout: | |
| 23 | $(shell if [ ! -d "$(DIR)" ]; then mkdir "$(DIR)"; fi) | |
| 24 | ||
| 25 | # build phoenix | |
| 26 | $(DIR)/phoenix.o: $(PH)/phoenix.cpp | |
| 27 | $(CXX) $(CXXFLAGS) -c -o $@ $< | |
| 28 | - | $(DIR)/phoenix-resource.o: $(PH)/windows/phoenix.rc |
| 28 | + | |
| 29 | - | $(WINDRES) $< $@ |
| 29 | + | |
| 30 | $(DIR)/%.o: %.cpp $(HEADERS) | |
| 31 | $(CXX) $(CXXFLAGS) -c -o $@ $< | |
| 32 | $(DIR)/%.o: %.cc | |
| 33 | $(CXX) $(CXXFLAGS) -c -o $@ $< | |
| 34 | $(DIR)/$(BIN): $(OBJ) | |
| 35 | $(CXX) -mwindows -s -o $@ $(OBJ) $(GTK_LIB) |