--- dumb-0.9.3.old/Makefile +++ dumb-0.9.3/Makefile @@ -26,7 +26,7 @@ .PHONY: all install uninstall clean veryclean distclean config config-if-necessary make-outdirs -PHONY_TARGETS := core allegro core-examples allegro-examples core-headers allegro-headers +PHONY_TARGETS := core allegro core-headers allegro-headers .PHONY: $(PHONY_TARGETS) .PHONY: $(PHONY_TARGETS:%=install-%) @@ -193,13 +193,9 @@ allegro/datunld.c \ allegro/packfile.c -CORE_EXAMPLES := examples/dumbout.c examples/dumb2wav.c -ALLEGRO_EXAMPLES := examples/dumbplay.c - CORE_HEADERS := include/dumb.h ALLEGRO_HEADERS := include/aldumb.h - LIBDIR := lib/$(PLATFORM) OBJDIR_BASE := obj/$(PLATFORM) @@ -236,14 +232,6 @@ LDFLAGS := -s - -CORE_EXAMPLES_OBJ := $(addprefix examples/, $(notdir $(patsubst %.c, %.o, $(CORE_EXAMPLES)))) -ALLEGRO_EXAMPLES_OBJ := $(addprefix examples/, $(notdir $(patsubst %.c, %.o, $(ALLEGRO_EXAMPLES)))) - -CORE_EXAMPLES_EXE := $(addprefix examples/, $(notdir $(patsubst %.c, %$(EXE_SUFFIX), $(CORE_EXAMPLES)))) -ALLEGRO_EXAMPLES_EXE := $(addprefix examples/, $(notdir $(patsubst %.c, %$(EXE_SUFFIX), $(ALLEGRO_EXAMPLES)))) - - CORE_LIB_FILE_RELEASE := $(LIBDIR)/libdumb.a ALLEGRO_LIB_FILE_RELEASE := $(LIBDIR)/libaldmb.a @@ -254,9 +242,6 @@ core: $(CORE_LIB_FILE_RELEASE) $(CORE_LIB_FILE_DEBUG) allegro: $(ALLEGRO_LIB_FILE_RELEASE) $(ALLEGRO_LIB_FILE_DEBUG) -core-examples: $(CORE_EXAMPLES_EXE) -allegro-examples: $(ALLEGRO_EXAMPLES_EXE) - core-headers: allegro-headers: @@ -269,25 +254,12 @@ $(call COPY,$(ALLEGRO_LIB_FILE_RELEASE),$(LIB_INSTALL_PATH)) $(call COPY,$(ALLEGRO_LIB_FILE_DEBUG),$(LIB_INSTALL_PATH)) -ifeq "$(COMSPEC)" "" -install-core-examples: core-examples - $(call COPY,$(CORE_EXAMPLES_EXE),$(BIN_INSTALL_PATH)) - -install-allegro-examples: allegro-examples - $(call COPY,$(ALLEGRO_EXAMPLES_EXE),$(BIN_INSTALL_PATH)) -else -# Don't install the examples on a Windows system. -install-core-examples: -install-allegro-examples: -endif - install-core-headers: $(call COPY,$(CORE_HEADERS),$(INCLUDE_INSTALL_PATH)) install-allegro-headers: $(call COPY,$(ALLEGRO_HEADERS),$(INCLUDE_INSTALL_PATH)) - uninstall-core: $(call DELETE,$(LIB_INSTALL_PATH)/$(notdir $(CORE_LIB_FILE_RELEASE))) $(call DELETE,$(LIB_INSTALL_PATH)/$(notdir $(CORE_LIB_FILE_DEBUG))) @@ -296,25 +268,12 @@ $(call DELETE,$(LIB_INSTALL_PATH)/$(notdir $(ALLEGRO_LIB_FILE_RELEASE))) $(call DELETE,$(LIB_INSTALL_PATH)/$(notdir $(ALLEGRO_LIB_FILE_DEBUG))) -ifeq "$(COMSPEC)" "" -uninstall-core-examples: - $(call DELETE,$(patsubst %,$(BIN_INSTALL_PATH)/%,$(notdir $(CORE_EXAMPLES_EXE)))) - -uninstall-allegro-examples: - $(call DELETE,$(patsubst %,$(BIN_INSTALL_PATH)/%,$(notdir $(ALLEGRO_EXAMPLES_EXE)))) -else -# The examples wouldn't have been installed on a Windows system. -uninstall-core-examples: -uninstall-allegro-examples: -endif - uninstall-core-headers: $(call DELETE,$(patsubst %,$(INCLUDE_INSTALL_PATH)/%,$(notdir $(CORE_HEADERS)))) uninstall-allegro-headers: $(call DELETE,$(patsubst %,$(INCLUDE_INSTALL_PATH)/%,$(notdir $(ALLEGRO_HEADERS)))) - OBJDIR := $(OBJDIR_BASE)/release CFLAGS := $(CFLAGS_RELEASE) CORE_LIB_FILE := $(LIBDIR)/libdumb.a @@ -327,30 +286,13 @@ ALLEGRO_LIB_FILE := $(LIBDIR)/libaldmd.a include make/Makefile.inc - -$(CORE_EXAMPLES_EXE): examples/%$(EXE_SUFFIX): examples/%.o $(CORE_LIB_FILE_RELEASE) - $(CC) $^ -o $@ $(LDFLAGS) $(LINK_MATH) - -$(ALLEGRO_EXAMPLES_EXE): examples/%$(EXE_SUFFIX): examples/%.o $(ALLEGRO_LIB_FILE_RELEASE) $(CORE_LIB_FILE_RELEASE) - $(CC) $^ -o $@ $(LDFLAGS) $(LINK_ALLEGRO) - -$(CORE_EXAMPLES_OBJ): examples/%.o: examples/%.c include/dumb.h - $(CC) $(CFLAGS_RELEASE) -c $< -o $@ - -$(ALLEGRO_EXAMPLES_OBJ): examples/%.o: examples/%.c include/dumb.h include/aldumb.h - $(CC) $(CFLAGS_RELEASE) -Wno-missing-declarations -c $< -o $@ - - clean: $(call DELETE,$(OBJDIR_BASE)/release/*.o) $(call DELETE,$(OBJDIR_BASE)/debug/*.o) - $(call DELETE,examples/*.o) veryclean: clean $(call DELETE,$(CORE_LIB_FILE)) $(call DELETE,$(ALLEGRO_LIB_FILE)) - $(call DELETE,$(CORE_EXAMPLES_EXE)) - $(call DELETE,$(ALLEGRO_EXAMPLES_EXE)) distclean: veryclean $(call DELETE,make/config.txt)