mirror of
https://github.com/ScrelliCopter/VGM-Tools
synced 2025-02-21 04:09:25 +11:00
move main to a new source file, update makefile to support multiple sources
This commit is contained in:
@@ -1,12 +1,23 @@
|
||||
TARGET := neoadpcmextract
|
||||
SOURCE := neoadpcmextract.c
|
||||
SOURCE := autoextract.c neoadpcmextract.c
|
||||
CFLAGS := -std=c99 -O2 -pipe -Wall -Wextra -pedantic
|
||||
LDFLAGS := $(CFLAGS)
|
||||
|
||||
|
||||
OBJECT := $(SOURCE:%.c=%.o)
|
||||
DEPEND := $(OBJECT:%.o=%.d)
|
||||
|
||||
.PHONY: default all clean
|
||||
default: $(TARGET)
|
||||
all: $(TARGET)
|
||||
|
||||
$(TARGET): $(SOURCE)
|
||||
$(CC) $(CFLAGS) $< -o $@
|
||||
$(TARGET): $(OBJECT)
|
||||
$(CC) $(LDFLAGS) $^ -o $@
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -MMD -c $< -o $@
|
||||
|
||||
-include: $(DEPEND)
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f $(TARGET)
|
||||
rm -f $(TARGET) $(OBJECT) $(DEPEND)
|
||||
|
||||
Reference in New Issue
Block a user