mirror of
https://github.com/javalsai/lidm.git
synced 2025-07-03 06:15:03 +02:00
init structure
This commit is contained in:
commit
4d8faa5b5f
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
li
|
||||
dist/
|
26
Makefile
Normal file
26
Makefile
Normal file
@ -0,0 +1,26 @@
|
||||
CDIR=src
|
||||
LDIR=lib
|
||||
IDIR=include
|
||||
ODIR=dist
|
||||
|
||||
CC=gcc
|
||||
CFLAGS=-I$(IDIR)
|
||||
|
||||
LIBS=-lm
|
||||
|
||||
_DEPS =
|
||||
DEPS = $(patsubst %,$(IDIR)/%,$(_DEPS))
|
||||
|
||||
_OBJ = main.o
|
||||
OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ))
|
||||
|
||||
$(ODIR)/%.o: $(CDIR)/%.c $(DEPS)
|
||||
@mkdir -p $(ODIR)
|
||||
$(CC) -c -o $@ $< $(CFLAGS)
|
||||
|
||||
li: $(OBJ)
|
||||
$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f $(ODIR)/*.o *- li $(INCDIR)/*-
|
3
src/main.c
Normal file
3
src/main.c
Normal file
@ -0,0 +1,3 @@
|
||||
int main() {
|
||||
return 2;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user