mirror of
https://git.soft.fish/val/MicroCorruption.git
synced 2024-11-22 19:25:58 +00:00
no emulation today, sorry
This commit is contained in:
parent
8e0886fb93
commit
bd3e20d4e4
@ -1,59 +0,0 @@
|
|||||||
|
|
||||||
# ---------- Variables listed below --------- #
|
|
||||||
# Executable
|
|
||||||
TARGET := main.out
|
|
||||||
|
|
||||||
# Paths to source, include, dependency, and object files
|
|
||||||
SPATH = src
|
|
||||||
IPATH = inc
|
|
||||||
DPATH = dep
|
|
||||||
OPATH = obj
|
|
||||||
|
|
||||||
# File type of source file
|
|
||||||
STYPE = cc
|
|
||||||
|
|
||||||
VPATH = $(SPATH) $(IPATH) $(DPATH) $(OPATH)
|
|
||||||
|
|
||||||
# compiler and compiler flags
|
|
||||||
CC = g++
|
|
||||||
CFLAGS = -I$(IPATH) -std=c++11 -Os
|
|
||||||
|
|
||||||
# list of object files
|
|
||||||
SOURCES = $(wildcard $(SPATH)/*.$(STYPE))
|
|
||||||
OBJECTS = $(addprefix $(OPATH)/,$(notdir $(SOURCES:.$(STYPE)=.o)))
|
|
||||||
|
|
||||||
|
|
||||||
# ----------- Targets listed below ---------- #
|
|
||||||
# Some targets aren't real
|
|
||||||
.PHONY: all clean run dump
|
|
||||||
# Don't autodelete object files:
|
|
||||||
.PRECIOUS: $(OPATH)/%.o
|
|
||||||
|
|
||||||
all: $(DPATH) $(OPATH) $(TARGET)
|
|
||||||
|
|
||||||
dump:
|
|
||||||
@echo SOURCES: $(SOURCES)
|
|
||||||
@echo OBJECTS: $(OBJECTS)
|
|
||||||
@echo TARGET: $(TARGET)
|
|
||||||
@echo VPATH: $(VPATH)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
-rm $(TARGET)
|
|
||||||
-rm -r dep obj
|
|
||||||
|
|
||||||
run:
|
|
||||||
-$(addprefix ./,$(addsuffix ;,$(TARGET)))
|
|
||||||
|
|
||||||
$(DPATH) $(OPATH):
|
|
||||||
mkdir -p $@
|
|
||||||
|
|
||||||
# Make the executable(s)
|
|
||||||
%.out: $(OBJECTS)
|
|
||||||
$(CC) $(CFLAGS) -o "$@" $^
|
|
||||||
# Make the object and dependency files
|
|
||||||
$(OPATH)/%.o: $(SPATH)/%.$(STYPE)
|
|
||||||
$(CC) $(CFLAGS) -MMD -MF "$(DPATH)/$(@F:.o=.d)" -o "$@" -c "$<"
|
|
||||||
|
|
||||||
# --------- Inclusions listed below --------- #
|
|
||||||
# use dependencies when rebuilding
|
|
||||||
-include $(wildcard $(DPATH)/*.d)
|
|
@ -1,6 +0,0 @@
|
|||||||
#ifndef MAIN_HH_INCLUDED
|
|
||||||
#define MAIN_HH_INCLUDED
|
|
||||||
|
|
||||||
const int a = 0;
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,10 +0,0 @@
|
|||||||
|
|
||||||
#include "main.hh"
|
|
||||||
|
|
||||||
#include <cstdio>
|
|
||||||
#include <cstdlib>
|
|
||||||
#include <cstring>
|
|
||||||
|
|
||||||
int main (int argc, char *argv[]) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user