if the main.c is not changed but the file controller.c has some changing, the makefile is doing nothing,
i always have to change the main.c and save it.
is there a way that the makefile is compiling everything again, although nothing has been changed at main.c?
compiling without changing main.c
-
- DCEmu Junior
- Posts: 43
- https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
- Joined: Mon Feb 20, 2017 7:49 pm
- Has thanked: 0
- Been thanked: 0
- T_chan
- DC Developer
- Posts: 32
- Joined: Mon Aug 22, 2011 12:45 pm
- Has thanked: 12 times
- Been thanked: 22 times
Re: compiling without changing main.c
Maybe try:
make clean
make
(1st command deletes intermediate objects normally)
make clean
make
(1st command deletes intermediate objects normally)
- BlueCrab
- The Crabby Overlord
- Posts: 5658
- Joined: Mon May 27, 2002 11:31 am
- Location: Sailing the Skies of Arcadia
- Has thanked: 9 times
- Been thanked: 69 times
- Contact:
Re: compiling without changing main.c
If you really want it to recompile main.c even though it hasn't changed, then you probably should be running "make clean" as was said. That said, unless you're doing something like '#include "controller.c"' in main.c, then you shouldn't need to recompile main.c if it hasn't changed...
If you only want it recompiling the file that changed and redoing the linking step, then if you set up dependencies correctly in your Makefile, that should happen already. If you're actually #include'ing the controller.c in main.c, then you can also use dependencies to deal with that in your Makefile (but you really shouldn't be doing that with #include -- that's what the linker is for).
If you only want it recompiling the file that changed and redoing the linking step, then if you set up dependencies correctly in your Makefile, that should happen already. If you're actually #include'ing the controller.c in main.c, then you can also use dependencies to deal with that in your Makefile (but you really shouldn't be doing that with #include -- that's what the linker is for).