CC=g++ CFLAGS=-c -std=c++0x -O4 -MMD -MP -Wall -I../stocktwits/json -ggdb -DJSON_ISO_STRICT LDFLAGS=-lpthread -lz -L/usr/lib64/mysql -lmysqlclient -lssl -lcrypto SOURCES = \ ../shared/LogFile.C \ ../oddsmaker/UserInfo.C \ ../fast_alert_search/FieldLists.C \ ../fast_alert_search/DataFormat.C \ ../ax_alert_server/ConfigWindow.C \ ../ax_alert_server/AlertConfig.C \ ../ax_alert_server/BitSet.C \ ../ax_alert_server/TopListConfig.C \ ../ax_alert_server/FormatTime.C \ ../ax_alert_server/CloudSupport.C \ MiscNFS.C \ NfsHelper.C \ RecordLanguage.C \ MiscRODatabase.C \ main.C SOURCES_MOVE = \ ../shared/SimpleLogFile.C \ NfsHelper.C \ MoveCloudToNfs.C JSON=$(wildcard ../stocktwits/json/Source/*.cpp) OBJECTS=$(SOURCES:.C=.o) $(JSON:.cpp=.o) OBJECTS_MOVE=$(SOURCES_MOVE:.C=.o) DEPENDENCIES=$(OBJECTS:.o=.d) $(OBJECTS_MOVE:.o=.d) all: misc_ms move_cloud_to_nfs misc_ms: $(OBJECTS) ../shared/shared.a $(CC) $(LDFLAGS) -o $@ $^ move_cloud_to_nfs: $(OBJECTS_MOVE) ../shared/shared.a $(CC) $(LDFLAGS) -o $@ $^ clean: rm -f $(OBJECTS) $(OBJECTS_MOVE) $(DEPENDENCEIS) misc_ms move_cloud_to_nfs $(MAKE) -C ../shared clean %.o: %.C $(CC) -o $@ $< $(CFLAGS) ../stocktwits/json/%.o: ../stocktwits/json/%.cpp $(CC) -o $@ $< $(CFLAGS) -Wno-reorder ../ax_alert_server/AlertConfig.o:../ax_alert_server/AlertConfig.C $(CC) -o $@ $< $(CFLAGS) -Wno-reorder # http://owen.sj.ca.us/~rk/howto/slides/make/slides/makerecurs.html shows # how to make recursive make files. ../shared/shared.a: force_look $(MAKE) -C ../shared force_look: true # Read the .d files. g++ automatically creates these to list the header files # used by each *.C file. -include $(DEPENDENCIES)